Creating Calculations

Self-calculating form fields are handy for order forms or anywhere that you might need to compute a value based on what users select on your form.

 

To create a calculating form field, first, create a Short Answer or Number field, then look for the Calculation option underneath the Field Specific area to the left when you have your field selected.  Click on the Calculation option and decide if you want to use a Date or Numeric calculation. Under the Default Value(Calculation) option you will see a drop-down list of fields, numbers, and mathematical symbols that you can use to set up the calculation.

 

Screen_Shot_2020-05-14_at_2.38.55_PM.png

 

Select a field from your form and use the operator buttons underneath to create an equation. If you need some help with understanding our calculator, we've got a great article that walks you through it Here. In the example below, we've created a calculation that includes the sub-total and tax from other field values.

 

Screen_Shot_2020-05-14_at_3.06.28_PM.png

 

Using Separate Values

When using select lists, checkboxes and radio buttons, you can check the box that says "Use separate values" under the advanced option editor option pictured below.  This allows you to add a number or text values to each option in the field.  This can be used in many different ways, but here is one example:

 

Say you wanted an order form where people could order different types Back to the Future props. You could add a select list field called "What prop would you like to purchase?" to your form with multiple prop options. Click on the field, then on the "Advanced Options Editor" button in the left column. Check the box that says "Use separate values" and assign a number value to each option, i.e. 5 for "Hoverboard"; $20 for "Flux Capacitor" and so on.

 

Screen_Shot_2020-05-14_at_3.18.25_PM.png

  

When you insert this field into a calculation, it will insert $5 into the calculation when the user chooses "Hoverboard"; $20 into the calculations with the user chooses "Flux Capacitor", etc.

 

Date/Time Field Calculations

Date/Time fields can now be used in the creation of calculations! For a full walkthrough on how to create these kinds of calculations, our full walkthrough can be found here.

 

Notes: 

  • You will see an error when using option values that are the same, such as setting two different items as both being $5.  This is because option values must be unique.  To get around this, you can set one item to $2, one to $2.0, one to $2.00, etc.  While these are all technically the same number, 2, the form builder sees them as unique values and will allow you to use them.

  • When you opt to use separate values, you have the option to save just labels, values, or both in your database. Whatever is saved will be displayed in the Notification/Confirmation Emails as well. For example, if the values are purely for calculation and you just need the label saved and displayed in the emails, you'll need to either opt to save labels AND values (both) or just labels if you don’t need the values.

  • If you intend to use Email Logic for Confirmation or Notification Emails, based on the field Values you will need to ensure that each Value is different.  For example, Values of 2, 2.0, 2.00, etc. will be seen as "2" by the Email Logic so any message with these Values will be sent.  To prevent this from happening each Value will need to different, such as 2, 3, 4, etc. for the Email Logic to successfully distinguish the Values.

Was this article helpful?
7 out of 18 found this helpful

Comments

0 comments

Please sign in to leave a comment.