Code execution must be enabled in Bricks for this feature to work. You can turn it on in Bricks > Settings > Builder Access > Code Execution.
The Calculator Field allows users to perform real-time calculations based on the values of other form fields in Bricks. This feature is especially useful for creating forms that need to compute totals, apply formulas, or process numeric input without requiring custom JavaScript code.
Settings
Once code execution is active, you’ll see new settings:
Formula Field: Here you write the formula using JavaScript. Use
form.field_name
to get a numeric value orform_raw.field_name
to get the raw input. Make sure that all fields used in the formula have a Name assigned.Hide Field: You can choose to hide the calculator field on the front end. It will still work and be available for other fields or backend processing.