I already have a reset button added to my form to clear everything completely and do use the following script
The "reset" button do clear all normal data fields but even the RESET button do not clear the data entered into a text field from a drop down selection.
I can delete one item at a time by selecting the value and then click remove.
I want to add another button that say "Remove All" and then all the values selected must be removed from this text field.
the current script for "Remove" button is.
I just want to change the above code that I can add to my REMOVE ALL button, to delete ALL items and not only the selected one.
I am new to adobe forms forum. how do you upload a form so that you can see?
The resetData() will clear all data. The example above is intended to show how you can target specific fields.
However you want to remove specific sections within the textfield, which will require the replace() method. This is where you look for a match in the textfield's .rawValue and replace it with an empty string "".
You can't upload files directly to the forums, but if you put it in a file sharing site and post the published link here I will have a look at it when I can.
I would recommend Acrobat.com, but please bear in mind that you need to Publish the file before it is available to anyone else.
Have a look at this example I did up for someone else. https://acrobat.com/#d=6hEiR5CSyQe1yUiqWXwEbg. Here it is looking at the rawValue of the listbox and stripping out the newlines (\n).
It might help,