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

Field Access

Not applicable
Is there a way to set the text in a field so that text can be added to the field, but not removed? IE if i type ABC into a field someone can add DEF, but cant remove ABC.

1 Reply
Level 10
Level 10
You can use the command xfa.event.prevText to tell you what was in the field before and the command xfa.event.newText to tell you what is in the field now. Then you will have to compare the two results (the newText will contain whatever is in the field at this time not just the chars that were added) and return the value back into the field that you want. I would use the change event and create another hidden field to hold the result while the user is working on your field. On the exit event you could put the contents of the hidden field back into the field that you want (you need to do this because you cannot change the content of the field you are working on (a focus thing)).

Make sense?