Forminator Field Group Calculations
-
I am using your awesome Field Groups to create a form similar to the one that you are showing on this page: https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#example-field-group-setup. I just have one extra calculation step that isn’t fully working. Here’s the test form: https://energybalanceinitiative.com/form-test-page/
Here’s where my form works:
Go the to Course Registration section towards the bottom
- Select a Registration Option (Please select a registration option below)
- If you select the third option ($120+ Instructor/Student(s) Group) the Field Group from your demo mentioned above appears
- If you add a number to “How many students are you registering?” the Student Information fields show up and the calculation field works correctly (see Student(s) Cost and Total calculation fields below).
Here’s where it doesn’t work:
If the user selects either of the first Registration Options ($95 or $25) it is automatically adding $20 for 1 student to the cost from the calculations from the field group mentioned above. This happens even if the number of students is set to 0.
Here is how my calculations work:
- The Registration Option radio buttons are each assigned a calculation value of $95, $25, & $100 (for the $120+ field) respectively.
- The Student(s) Cost calculation field that is set to be the number from “How many students are you registering?” x 20. Note that the “How many students…” field is only visible if you select the $120+ radio button because that is the only time it is applicable to the form.
- The Field “How many students are you registering?” is set to have a default value of 0 so any calculations before the user changes that field should be 0. You can see this working if you select the $120+ option. The Total field is $100 until you change that number of students and then if goes up $20 for each student added).
- The Total field is using this calculation: The value from #1 above (radio buttons with the values 95, 25, 100) + the value of #2 above (the Student(s) Cost calculation field) – any fields that offer coupon code discounts.
My question is how can I get the Total field to not add $20 for the first two Registration Options.
Is there a way to add conditions to a calculation? For example if option 3 from the Registration Option field is not selected ignore that Student(s) Cost field in the calculation?
Is there another way to run the calculations better like moving the costs from the Registration Options radio buttons to another calculation field?
Here is a screencast I put together showing my issues: https://app.screencastify.com/v3/watch/CYEaIRP9jzXOvXDSuovJ
The page I need help with: [log in to see the link]
- Select a Registration Option (Please select a registration option below)
- The topic ‘Forminator Field Group Calculations’ is closed to new replies.