Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Replace Line Feed a field with imported data

Avatar

Level 4

Hi, I’m trying to replace a line feed in a form field where data is imported to the field.

I can make the replace function work when typing into the field, but I can’t figure out how to make it work on imported data.

This is the script I use:

if (xfa.event.newText.match(/[\n]/) )

{

xfa.event.change = "LF"

}

Regards,

Kirstine

0 Replies

Avatar

Level 10

Hi,

So if I am getting you correctly, the imported data has the new lines (\n)?

You could try the layout:ready event and test against the field's .rawValue. But this is going to be very inefficient.

Niall

Avatar

Level 4

Hi,

I tried - it didn't work. So we have desided to deal with the new line issue prior to import.

Thanks anyway, Niall. 🙂