IF statements in a hidden field

By: Dave Briggs | Asked: 04/01/2024
ForumsCategory: General questionsIF statements in a hidden field
Dave Briggs asked 3 weeks ago
Hi all - hoping this is quite a simple one! I would like to run an IF statement to put a text string into a hidden field depending on the contents of another field. In human readable form, i want it to be IF field1 <5 THEN field2="low", if field1 >5 and <10 THEN field2="medium", IF field1 >10 THEN field2="high". Basically, depending on the number in field1, field2 can be low, medium or high. Can anyone let me know how to do this? Thank you so much! Dave
1 Answers
Rob LeVineRob LeVine answered 3 weeks ago
You can set up a conditional calculation in the field's Default Value calculation.
Dave Briggs replied 3 weeks ago

Thanks Rob. I have had a look and given it a go, but am constantly getting errors, despite trying different things. Am probably being thick!

If you could help me out, I'd be super helpful.

I have a range of questions on a page. Each has a numerical value. Those values are added together in a score field [157] to produce the score. This number can be between 5 and 20.

I want the contents of this new field to be

"Passive" if [157] is less than 4
"Developing" if [157] is less than 8
"Impactful" if [157] is less than 12
"Mainstreamed" if [157] is less than 16
"Transformational" if [157] is more than 16

If you could give an example of how I might achieve this, I would so appreciate it, I feel like i have tried everything but might well be making a silly mistake.

Rob LeVineRob LeVine replied 3 weeks ago

Can you post what you tried? Also, if you send me a message via this system, I can give you my email address to connect.

Dave Briggs replied 3 weeks ago

Thanks Rob - clicking your username doesn't load up any way of sending a message which is odd. My email starts with dave and ends with .co.uk with sensibletech in the middle. Be great to get your help!

Rob LeVineRob LeVine replied 3 weeks ago

Yeah, the messaging system is unnecessarily hard to find here. You can hover your cursor over the toolbar at the top of the page and click on the Messages button that pops up on the left of navigate to https://connect.formidableforms.com/messages I will see if I can decode your email address and send you a message.

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