Skip to main content
Participant
November 25, 2024
Answered

Creating a Form with Calculations and Checkboxes

  • November 25, 2024
  • 1 reply
  • 871 views

I am trying to figure out a formula for a fillable form, if it can even be done.  

If you click one box (Super.3) it would populate "SectionScore1" * 30% or .3

and if you click box (Other.4) it would pupulate "SectionScore1" * 40% or .4

I am trying to get both of these formulas in the same answer box. 

 

Otherwise, I am just going to take out the check boxes and have to answer box options. 

This topic has been closed for replies.
Correct answer Nesa Nurani

Just a tip if you go with the export values you don't need script, you can just use built in calculation option 'product(x)'.

1 reply

PDF Automation Station
Community Expert
Community Expert
November 25, 2024

Why not create 2 check boxes with the same name and 2 different export values?  In this example the export values would be .3 and .4.  This way, only one could be checked at a time.  If the check box name is Super.3, enter the following custom calculation script in the field:

if(this.getField("Super.3").value != "Off")

{event.value=this.getField("Subscore1").value * this.getField("Super.3").value}

else

{event.value=""}

Nesa Nurani
Community Expert
Nesa NuraniCommunity ExpertCorrect answer
Community Expert
November 25, 2024

Just a tip if you go with the export values you don't need script, you can just use built in calculation option 'product(x)'.

StephB89Author
Participant
November 25, 2024

Thank you for your assistance! I am brand new to the calculating and javascript world and the search engine helped a ton with my other issues, but i didn't even know you add export values!