• Resolved OnTiltSoon

    (@ontiltsoon)


    Hello,

    I have to make a very simple calculator if just has one field and has to output another number depending on that number. I’ve tried this

    (function(){
    if( fieldname2=1) return 15;
    if( fieldname2=2) return 24;
    if( fieldname2=3) return 28;
    if( fieldname2=4) return 32;
    if( fieldname2=5) return 36;
    if( fieldname2=6) return 40;
    if( fieldname2=7) return 44;
    if( fieldname2=8) return 48;
    if( fieldname2=9) return 52;
    if( fieldname2=10) return 56;
    if( fieldname2=11) return 60;
    if( fieldname2=12) return 64;
    if( fieldname2=13) return 68;
    if( fieldname2=14) return 72;
    if( fieldname2=15) return 76;
    if( fieldname2=16) return 80;
    if( fieldname2=17) return 84;
    if( fieldname2=18) return 88;
    if( fieldname2=19) return 92;
    if( fieldname2=20) return 96;
    })()

    Could you please help? This should be quite simple compared with other calculations you are doing.

    Thank you very much!

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

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Simple IF Function’ is closed to new replies.