Radio + Hidden + Calculated

The value of the Hidden Field can be used in the formula of the Calculated Field just as the value of any other field. However, the fact that this field is invisible to the user gives you an opportunity to add some values secretly. For example, with the help of the Hidden Field, you could add taxes to the Total Price formula.

Let’s assume we are creating an Order Form for a gift box. The user can choose which items to put inside, and you want to show the Total Price of the order and include taxes in it.

First of all, create a field with options that will have different values. For example, a Radio Field. Insert the values that will be used in the formula into the Calculate bar.

Now, the Hidden Field. Let’s assume that you have to pay 5% of the item’s price as a tax. So, the Value will have to be set to “0.05”.

The total price of the item will be the price of the item plus 5% of the price for taxes. That’s why the Calculated Field formula will look like that:

%FIELD::gifts_set%+%FIELD::gifts_set%*%FIELD::tax%

Let’s also add a Calculated Value Prefix and Suffix, so that the user will be able to understand which number he/she is being shown.

configuring calculated field

Press the “Publish” button at the top and place the table on the page.

Here’s how it looks like on the frontend: