Changing values based on another field

By: Filip Górny | Asked: 12/13/2023
ForumsCategory: How-toChanging values based on another field
Filip Górny asked 1 year ago
Hello, I have two fields: Toggle and Options.
The toggle has 'yes' or 'no'. The options has three options with values:
Standard|100
Prestige|200
Private|300   Now I would like to create a math calculation: Display normal option values BUT when user switch Toggle to 'yes' add +20|30|50 to options values.

Scenario: User leaves Toggle and click Prestige: result 200
User click Toggle and click Prestige: result 230

I have premium version. Please help :(
1 Answers
Rob LeVineRob LeVine answered 1 year ago
One way to do it is to have two radio options, one with 100,200,300 and another with 120,230,350 and use the conditional logic to hide/show based on the value of the toggle. You'll then likely have to have a hidden field for the chosen option value and use the frm_after_create_entry hook and set the chosen option into that value and that becomes the value you use for any further calculations or reports.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right