Two Conditional if statements from separate dropdowns
-
Hello, amazing plugin btw.
When a certain province (value=”100″) and year (value=”2020″) is selected from two seperate dropdowns, I would like the result to just be 0.
For all or any other selections, I would like to make a calculation.
I have been trying several ways and can’t seem to get the right && and all else this result.
This is where I am at:
(function(){
if(2020>fieldname14 && fieldname9>100)
{
return 0;
}
else
{
return fieldname23*fieldname39;
}
})()I have also tried:
(function(){
var result = 0;
if(fieldname9< == ‘100’){
if(fieldname14 == ‘2020’) result = 0;
else result = fieldname23*fieldname39;
}
return result;
})()then:
(function(){
var result = 0;
if(fieldname9 == ‘100’ && fieldname14 == ‘2020’) result = 0;)
{
else result = fieldname23*fieldname39;
}
return result;
})()Many thanks
The page I need help with: [log in to see the link]
- The topic ‘Two Conditional if statements from separate dropdowns’ is closed to new replies.