Calculable Fields
Overview
Calculable fields let you add dynamic calculations to forms: values update in real time based on user input (e.g. quantity × price, totals). In Divi 5, you add and configure them in the Form module’s Content tab.
Key features
- Real-time updates — Results update as users fill in fields.
- Flexible inputs — Use number fields or choice fields (select, radio, checkbox) in formulas.
- Conditional calculations — Run calculations only when certain conditions are met.
Prerequisites
Server-side calculations require PHP 8.0 or higher.
You also need:
- Source fields with stable Field IDs.
- Numeric input formats where formulas expect numbers.
- A clear output field to display calculation results.
Setup overview
A calculable form typically needs:
- Fields for calculation — Number or choice fields whose values are used in the formula.
- Calculation field — The field that performs the calculation and displays (or uses) the result.
- Formulas — Expressions that reference field IDs and operators (e.g.
%%quantity%% * %%price%%).
Configure these in the Form module in the Divi 5 Visual Builder under the relevant field and calculation settings.
Verify your calculations
- Enter sample values in all source fields.
- Confirm totals update immediately and match manual math.
- Submit a test entry and confirm any mapped/sent values are correct.
What's Next
- Follow Getting Started with Calculable Fields for setup steps.
- Continue to Field mapping if calculation outputs need to be saved.
- Return to Features overview for related form workflows.