Skip to main content
Known Participant
March 7, 2025
Question

Deselecting a checkbox and Reset a form

  • March 7, 2025
  • 1 reply
  • 1229 views

Hello!

I have a section on my interactive form where I created a mouse up action to reset a form on a set of checkboxes. 

 

Is there a way to also have a deselect option so if one item is deselected it will reset that specific checkbox?

 

Thank you so much for your help!

1 reply

PDF Automation Station
Community Expert
Community Expert
March 7, 2025

In the mouse up action:

if(event.target.value=="Off")

{//your reset script}

Known Participant
March 8, 2025

Thank you so much for your reply. 

Do I add the above script as a separate mouse up action using Java Script? When I did that it did not work. I put the name of the field in place of "your reset script" and it did not take. What am I missing? I am new to JavaScript. 

 

Thank you so much!

PDF Automation Station
Community Expert
Community Expert
March 10, 2025

Thank you so much, Nesa, but I am clearly doing something wrong. I am getting an illegal character 1: at line 2. I'm not sure where I am going wrong. I have uploaded the script for additional assistance. 

 

Thank you so much 


All of your quotatation marks are illegal chararters because they are curly quotes, not straight quotes like in the script you copied and pasted from @Nesa Nurani .  Use a plain text editor, like Notepad to write your scripts and you won't have this issue.  You can use Notepad to do a find and replace (Ctrl + h) and replace all 

“ and ” with ".