There are two ways the WordPress form Repeater Field value can be used in the formula of Calculated Field – as a Row Count and as a Custom Calculated Value. You can choose how to use it in the Calculate repeater row value drop-down list of the Field Settings menu section.

Rows Count

This option counts the number of items added to the repeater by the user. That number can be used in the WordPress Calculated Field formula.

defining the row value

Let’s assume that you are creating a gift box Order Form. Every user can order several boxes, so you add a repeater there. The price for every box is the same, and you want to show the users the Total Price of their order. To do that, you can put a Calculated Field under the WordPress form Repeater Field and make it multiply the number of boxes by the price. 

setting calculated field data

The price here is “10”, so the number of boxes is just multiplied by 10. Here’s how it will look like on the frontend:

Сustom Calculated Value

If you choose the “Custom” option in the Calculate repeater row value drop-down list, that will add a built-in WordPress calculated field to the repeater.

configuring custom calculated value

This field is just the same as a separate Calculated Field. The formula is added the same way and the same rules apply. In the example, it counts the sum of chosen values assigned to the Radio (“Packing”) and Checkbox (“Sweets”) fields options. The built-in field will calculate the resulting value for every added repeater block according to the formula.

Afterward, when you use the Repeater macro code (%FIELD::gift_box%) in the WordPress Calculated field outside of the repeater, it will insert the sum of calculated values for every WordPress repeater block added by the user.

getting sum of the calculated values on the frontend

On the frontend, it will look like that:

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:

As in every multi-choice field, the Checkbox Field creates a list of options, and each of those options can have different values. The difference is that the user can select not one but several variants. Still, the value of the Checkbox Field can be used in the formula of Calculated Field.The values you type into the Calculated bar will be used in the formula.

editing options for checkbox and calculated fields

If you use the macro code of the Checkbox Field in the formula, it will insert the sum of values selected by the user.

calculated checkbox form look on the frontend
calculated checkbox form look on the frontend

Here’s how it will look like on the frontend: