Is it possible to script reseting a dropdown value to its default value

I have a dropdown field ddSelection that is hidden. If the answer to radio button radSelect is ticked for "No" ddSelection is visible.
If a selection is then made from ddSelection and radSelect is ticked for "Yes" can it be scripted to reset ddSelection to its default value of " * * * Select * * * ".


Alistair Craigen


Voted Best Answer

You can reset a complete form, a set of fields, or just a single field using the Doc.resetForm() method:

http://help.adobe.com/en_US/acrobat/acrobat_dc_sdk/2015/HTMLHelp/index.html#t=Acro12_MasterBook%2FJS_API_AcroJS%2FDoc_methods.htm%23TOC_resetFormbc-92&rhtocid=_6_1_8_23_1_91

Look at example 2 to see how to reset just one field (even though it's about resetting a whole tree of fields, you can of course just provide one field name).

Karl Heinz Kremer
PDF Acrobatics Without a Net
PDF Software Development, Training and More...
http://www.khkonsulting.com


By Karl Heinz Kremer   


Please specify a reason: