Skip to main content
Participating Frequently
January 12, 2023
Répondu

Overwriting an auto populated text field from a drop down box.

I have a form that I am building that has a drop box that will auto populate a text field based on what the end user selects..  I also need the user to be able to overwrite that information with their own in the populated text field.  I’ve searched, but cannot find a solution that works for what I need.  When the populated text is overwritten, it defaults back to  the original text.  Any help would be appreciated., thank you.

Meilleure réponse par bebarth

Hi,

Did you have a look on this post:

https://community.adobe.com/t5/acrobat-discussions/is-there-a-way-to-allow-end-user-to-overwrite-a-auto-populated-text-field/m-p/12854483#M357659

Here is an other example with a drop down box.

@+

 

2 commentaires

bebarth
Community Expert
bebarthCommunity ExpertRéponse
Community Expert
January 12, 2023
Participating Frequently
January 12, 2023

Thank you!  This worked.

Thom Parker
Community Expert
Community Expert
January 12, 2023

From your description I'm assuming that your autopopulate script is in the calculate event in the text field?  If so then delete it.

Put the script for auto-populating the text field in the "Validation" script for the dropdown. Then data in the text field can be overwritten manually.  

 

 

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Participant
January 30, 2025

I am working on an issue like OP and your advice helps with being able to add text into the text box, but now the output is delayed and doesn't display until another calculation is run.

 

I tried calculateNow to no effect.

If I move the script back to the Calculate tab it refreshes on time, but goes right back to the OP problem.

Can't set Field Calculation Order for Validation scripts.

Thom Parker
Community Expert
Community Expert
January 31, 2025

Is the dropdown set to "commit selection immediately"?  This may be the issue.

 

Validation script run on a field when the value of that field is modified. Ordering has no meaning in this context. 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often