WhatsApp Flows support conditional field visibility and calculated totals, but the calculation part works differently from a typical form builder — it uses JavaScript ternary logic pasted into a data source, not a drag-and-drop formula field. This guide walks through both, using an event registration form as the example.
Show fields only when a previous answer meets a condition — for example, showing "Person 2" details only if the customer selected 2 or more packs.
Conditional visibility only applies to input fields (text, dropdown, etc.) — not to text or heading elements.
Say each visitor's pricing depends on whether they need a stay: ₹2500 if yes, ₹750 if no, ₹0 if the field isn't present at all.
Prompt ChatGPT with something like "write this logic using a ternary operator in JavaScript." Copy only the formula it returns, then swap in your dynamic field variables in place of the static example values.
Before entering your real formula, add a placeholder test calculation (e.g., 4 + 4) and click Run & Save. This unlocks the output field in history. Now replace the placeholder with your actual formula and map it into the text or body field. Do not click Run & Save again once the real formula is in place — there's no live form data available at that point, and re-running it breaks the mapping.
You can display any combination of the calculated values — total packs, packs with stay, packs without stay, total payable amount — all dynamically pulled from your calculation fields on the summary screen.
Was this helpful? If you are stuck, message us on WhatsApp and a real person will help.
Ask us on WhatsApp