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"
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.