• Resolved barthulley

    (@barthulley)


    Hi there. I’m a bit disappointed it’s necessary to learn javascript in order to run calculations in this plugin. I’m having trouble with my code (because I don’t know java!)… perhaps someone can tell me why the second line of this code won’t work: (when fieldname4 = 2)

    (function(){

    if(fieldname4 == 1) return fieldname9*209;
    if(fieldname4 == 2) return (0.76+fieldname9)*209;
    if (fieldname4 == 3) return fieldname9*40;
    if (fieldname4 == 4) return fieldname9*50;

    })();

    Any pointers appreciated!

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter barthulley

    (@barthulley)

    My script was fine – the variable had magically disappeared from field 9.

    Plugin Author codepeople

    (@codepeople)

    Hi,

    The structure of your equation is correct. Could you send me the link to your page to check the form’s structure, please?

    Bet regards.

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