Ouput section: column explanation
A | B | C | D | E |
Calculate | ||||
Label | Values (formulas) | (not used) | Settings | Logic id |
Label (A)
The text in this field is used as the label/description of your output.
Value (Formula) (B)
The value in this field is what will be displayed when the output is shown on the page. Excel formulas can be entered in this field, as shown in this example:
A | B | C | D | E |
Calculate | ||||
Your price | =IF(B2>L4;(B2-L4)*L3+L2;) | totalPrice |
This automatically calculates the total price based on the user's input.
Settings (D)
Output settings are written as follows {decimal:0}, with curly braces. In this example, it removes all decimal places from the output. For outputs, we have the following settings:
- {decimal:0}: Used to specify how many decimal places you want your output to have. Just change the number after the colon.
- {html:true}: Used in rare cases where you need long texts in your output, or want to insert HTML.
- {plain:true}: Used to remove all special characters from your output.
Logic id (E)
Column E is used to enter what we call logic ids. A logic id is used when you want to insert a result on a page, or if you want a certain input to be in a specific place on your calculator.
Logic ids are also used in other parts of the platform where you may need to refer to a specific field. We recommend always giving your input fields a logic id, as well as any output fields you need.
Logic id should always be one word, and we recommend keeping the id in English to avoid issues with special characters, as shown in these examples:
- loanAmount
- duration
- firstName
- address
- zip
To insert an output on your page, surround the logic id with underscores, as shown in this example:
Which results in this: