• Resolved ilden

    (@ilden)


    Hey! The plugin has been amazing so far very useful!

    I am trying to set up multiple IF statements but when ever i do more then 1 it doesn’t show the total?

    If i only have 1 IF statement it works fine? Heres my code.

    (function(){

    IF(fieldname2==’1′ && fieldname3==’1′) return fieldname6*0.008

    IF(fieldname2==’1′ && fieldname3==’2′) return fieldname6*0.008753333

    })();

    https://www.ads-software.com/plugins/calculated-fields-form/

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

    (@codepeople)

    Hi,

    Please do not confuse the operation “IF” included by the plugin, and the conditional statement “if” of javascript. Javascript is a case-sensitive language, so lower case and upper case are important.

    The correct equation would be:

    (function(){
    if(fieldname2=='1' && fieldname3=='1') return fieldname6*0.008
    if(fieldname2=='1' && fieldname3=='2') return fieldname6*0.008753333
    })()

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘IF Statments’ is closed to new replies.