Skip to main content
Participant
October 30, 2017
Answered

When I save my pdf and reopen it, my dependent comboboxes reset! How can I fix it?

  • October 30, 2017
  • 1 reply
  • 764 views

I have this fillable pdf with some simple forms. However I needed to create a dependent combo box with javascript. The form is working perfectly but when i save pdf and reopen it after the comboboxes are reseted due to javascript I think. Is there a way that i keep the form workable but the presented content is the one from the last save?

Thank you in advance

https://drive.google.com/open?id=0B0H-7Il2MDDeSmNxNVpRaXg5YlU

This topic has been closed for replies.
Correct answer try67

Just remove the setItems commands. You don't need them, unless the data changes.

1 reply

try67
Community Expert
Community Expert
October 30, 2017

When you use the setItems command on a field it reverts its value to the default value defined in the list (the first item).

So either remove those calls from the doc-level script or add code that re-applies the currently selected value after you've set the field's items.

mat3usAuthor
Participant
October 31, 2017

Hi @try67 . Sorry mate could you help me out with the coding. I'm not a programmer I just managed to do this form from tutorials i saw, but now I'm stuck in this last part. It is important for me. It could be something like a save form button and reset form button if that is possible. so that it remembers the actual fields or not!

Thank you

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
October 31, 2017

Just remove the setItems commands. You don't need them, unless the data changes.