Skip to main content
May 12, 2020
Answered

How can I set a signature block so it is disabled unless someone selects "Coining" in the Req. Div.?

  • May 12, 2020
  • 1 reply
  • 2557 views

This is what I was asked to do, but I have never done anything with Adobe Acrobat or JavaScript before other than create a basic form without any fillable fields.

This is what he sent me:

 

Set the 3 “Coining signature blocks” as disabled by default (when anyone opens form)

                If the user selects “Coining” from the Requesting Division” dropdown, the 3 Coining signature blocks become .enable or possible .visible=true.

                IF the user selects ANYTHING else from the “Requesting Division” box, the Coining signature block are .disabled or .visible=false

 

Thank you so much for your help with this.  I welcome any input or suggestions on how to learn how to do this as well.  I look forward to your replies.

Patti_Brown

               

 

 

 

This topic has been closed for replies.
Correct answer

Thank you for your help, I really appreciate it.  I made the changes you suggested and it fixed the syntax error at 10: line 11.

Now I'm getting a synax error at 15: line 16

 

1 reply

try67
Community Expert
Community Expert
May 14, 2020

Use this code as the custom calculation script of the drop-down field (and make sure to tick the option to commit the selected value immediately under its Properties, Options tab):

 

this.getField("First Shift Coordinator SignatureRow1").readonly = (event.value!="Coining");

this.getField("Second Shift Coordinator SignatureRow1").readonly = (event.value!="Coining");

this.getField("Third Shift Coordinator SignatureRow1").readonly = (event.value!="Coining");

 

PS. When you open the form those fields will be enabled, because you've set "Coining" as the default value of the field.

 

Edit: Small mistake in the code fixed

Correct answer
May 20, 2020

Thank you for your help, I really appreciate it.  I made the changes you suggested and it fixed the syntax error at 10: line 11.

Now I'm getting a synax error at 15: line 16

 

try67
Community Expert
Community Expert
May 20, 2020

Since there are only 3 lines in the code I provided please post your full code for further help.