Skip to main content
Known Participant
Jun 17, 2020 7:32 PM UTC
Question

Using a Check Box to Show a field

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 is closed to new replies. Start a new post to keep the conversation going.

4 replies

try67
Community Expert
Community Expert
Jun 18, 2020 8:21 AM UTC

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.

Translate
Known Participant
Jun 18, 2020 11:50 AM UTC

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!

Translate
try67
Community Expert
Community Expert
Jun 18, 2020 2:00 PM UTC

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

 

Translate