Calculate Total of Drop down field

  • Profile Image
    Asked on September 12, 2014 at 06:57 AM
    To recreate this set up, what type of field should the Grand Total field be? 
  • Profile Image
    Answered on September 12, 2014 at 09:29 AM


    Would you mind elaborating your question?

    If you want to include drop down values in the calculation, I would recommend assigning calculation values in each of the options under its properties.

    And here's how to perform calculation in the form.

    If you have further questions, let us know.


  • Profile Image
    Answered on September 12, 2014 at 11:18 AM


    I'm trying to recreate the JS solution that was provided here:

    Unfortunately the built-in drop down calculation functionality will satisfy my requirements but a JS solution might. See more here:

    So my question is, is there anything special about the Grand Total field? Is it just a read-only text entry field?

    Also, I cloned the form from this solution and added the custom JS to the source HTML but the calculation does not work. Is there a reason why this solution would not work any more?


  • Profile Image
    Answered on September 12, 2014 at 12:55 PM

    There is nothing special about the Grand Total field in the form you referenced.  It is indeed just a read on text box.  When the form is cloned the field ID's may not be the same.  Since the script references specific field ID's:

    var efee = document.getElementById("input_10"),
    cfee = document.getElementById("input_11"),
    extraz = document.getElementById("input_13"),
    clazz = document.getElementById("input_14"),
    gtotal = document.getElementById("input_28");

    If these ID's do not match the input ID's for your form, the calculation will not be made. Other than that. There should be no reason why that solution should not still work.