Skip to main content
sd0123
Known Participant
July 4, 2018
Question

Reset button to make submit buttons read only

  • July 4, 2018
  • 1 reply
  • 416 views

I have a reset button at the end of my PDF.  I want it to make my radio groups not read only and to make my submit buttons read only.  I have the first part working, but not the latter.  Here is my script on the Restart button:

var Q = ["KAQuestion.1", "KAQuestion.2", "KAQuestion.3", "KAQuestion.4", "KAQuestion.5", "KAQuestion.6", "KAQuestion.7"];

for (var i in Q) this.getField(Q).readonly = false; // this part is working to enable the Question radio group options

var S = ["Submit1", "Submit2", "Submit3", "Submit4", "Submit5", "Submit6", "Submit7"];

for (var i in S) this.getField(S).readonly = true; // this part is not working to disable the Submit# buttons

Thank you for your help, in advance

This topic has been closed for replies.

1 reply

Bernd Alheit
Community Expert
Community Expert
July 4, 2018

What happens when you execute code in the console?

sd0123
sd0123Author
Known Participant
July 4, 2018

I works beautifully now.  Maybe I just needed to close and restart Acrobat, idk :/  Thank you for your time!