7 Replies Latest reply on Dec 7, 2016 3:05 PM by kateh66501604

    Custom calculation javascript for complicated form

    kateh66501604

      Hello,

       

      I have a booking form with some complicated calculations that requires 'if' and 'then' custom javascript.

       

      The form offers tickets at $350 per person, up to 16 people, with up to 4 additional tickets for $100 each. I tried some script from a previous form but I just don't know how to customise the script to take the initial 16 tickets into account, and then any additional number of tickets after that.

       

      var numTix = Number(this.getField("QTY1").value);

      if (numTix==0) event.value = 0;

      else if (numTix==1) event.value=350;

      else event.value = 350+((numTix-1)*100);

       

       

      Any suggestions would be very greatly appreciated.

       

       

      Thanks,

      Kate