Highest / Lowest Values

By: NATE Qureshi | Asked: 02/29/2024
ForumsCategory: General questionsHighest / Lowest Values
NATE QureshiNATE Qureshi asked 10 months ago

I am getting values in four variables for some likertscale question as tey have just two question which may be have values like 1 to 4

field_id 172 = can have any values from 1 to 4
field_id 171 = can have any values from 1 to 4
field_id 170 = can have any values from 1 to 4
field_id 169 = can have any values from 1 to 4

I've created a 2 fields which is storing the highest and lowest value i.e

field id= 480 default value is Math.max([172],[171],[170],[169])
field id = 481 default value is Math.max([172],[171],[170],[169])

I want to show some text that what role it can be if values matches so let take 481

[frm-condition source=frm-math content="[481]" equals="[172]"]Integrator[/frm-condition]
[frm-condition source=frm-math content="[481]" equals="[171]"]Policy Advisor[/frm-condition]
[frm-condition source=frm-math content="[481]" equals="[170]"]Catalyst[/frm-condition]
[frm-condition source=frm-math content="[481]" equals="[169]"]Business Co-Leader[/frm-condition]

WHAT IS HAPPENING IS

This works right and do show role as single text like Integrator BUT If all or some values are equal it show results like

IntegratorPolicyAdvisorCatalystBusinessCo-Leader

How I can just want to have single text if values are equals

Please advise

NATE

1 Answers
Victor Font answered 10 months ago
I would probably do a calculation like this in jQuery so it executes in the browser and not on the server. You can use if/else conditionals with Formidable, but for me, it's easier to use jQuery.

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