Support » Plugin: Calculated Fields Form » Formula works and doesn't

  • Resolved flabrea

    (@flabrea)


    Hi guys,

    something strange in my formula?! It works as soon as the entered value is smaller than 0.1 or larger than 1. For every value in fieldname113 between 0.1 and 0.99999999 i do not get a result?! why is that?

    (function(){
    if(fieldname111 == 0) return 0;
    if(fieldname111 == 1 && fieldname113 <= 0.1) return (40*fieldname63*fieldname11+80);
    if(fieldname111 == 1 && fieldname113 >> 0.1) return fieldname113*100*4*fieldname11*fieldname63+80;
    })()

    thanks for your help!

    https://wordpress.org/plugins/calculated-fields-form/

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

    (@codepeople)

    The symbols for comparissions are:

    <, >, ==, <=, >=, !=

    So the correct would be:

    (function(){
    if(fieldname111 == 0) return 0;
    if(fieldname111 == 1 && fieldname113 <= 0.1) return (40*fieldname63*fieldname11+80);
    if(fieldname111 == 1 && fieldname113 > 0.1) return fieldname113*100*4*fieldname11*fieldname63+80;
    })()

Viewing 1 replies (of 1 total)
  • The topic ‘Formula works and doesn't’ is closed to new replies.