Skip to main content
Known Participant
June 17, 2020
Question

Using a Check Box to Show a field

  • June 17, 2020
  • 1 reply
  • 789 views

I am looking to use a check box to show or hide a field.  The only thing is when the check box is checked i want a field to be filled with a calculated number.  But when the check box is unchecked i want it to fill with a 0.  Is this possible?  Thanks in advance

This topic has been closed for replies.

1 reply

try67
Community Expert
June 18, 2020

Sure. As the custom calculation script of the field you can use something like this:

 

if (this.getField("Checkbox1").valueAsString=="Off") event.value = 0;

else event.value = ... ;

 

Replace "Checkbox1" with the actual name of the field and "..." with the actual calculation you want to use.

Known Participant
June 18, 2020

So I am very new to this and I am still having an issue.  What i have is below:

I am trying to have the drop down fill in the FET line next to it with either a zero or a calculation depending on what is selected from the drop down menu (2 options).

 

Thanks in advacne for your help!

try67
Community Expert
June 18, 2020

You need to provide more details: What values? What options? What calculation? What are the field names?

Also, read these tutorials:

https://acrobatusers.com/tutorials/conditional-execution

https://acrobatusers.com/tutorials/change_another_field