Viewing 1 replies (of 1 total)
  • Plugin Author codepeople

    (@codepeople)

    Hi,

    I’ll try to explain the process with an example:

    Assuming your form includes the radion button field: fieldname1, with two choices, each of them with the values, 1 and 2 respectively, and two number fields: fieldname2, and fieldname3.

    Finally, if the equation associated to the calculated field is:

    fieldname2+fieldname3 if the choice 1 is selected in the fieldname1,

    and fieldname2*fieldname3 if the choice selected is the 2,

    the equation associated to the calculated field would be:

    IF(fieldname1==1, fieldname2+fieldname3, fieldname2*fieldname3)

    another valid equations are:

    (fieldname1==1) ? fieldname2+fieldname3 : fieldname2*fieldname3

    or

    (function(){
    if(fieldname1) return fieldname2+fieldname3;
    else return fieldname2*fieldname3;
    })()

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘How to perform logic against Radio option’ is closed to new replies.