table element to calculate fields

  • PVRN
    Asked on February 14, 2020 at 4:43 AM

    I am looking for a table like element that gives me the possibility to be filled in with by exemple 5 names. The purpose is that the subsciber can invite up to 5 persons for a dinner. If for instance 2 persons are filled in then I would like to calculate 2 * 66€ in the total fields.

    Maybe you can help me.

    Patrick




  • John Support Team Lead
    Replied on February 14, 2020 at 6:39 AM

    Hello Patrick - The closest workaround I can think of to achieve the requirement is to use a Spreadsheet Widget. You can assign calculation formulas to designated cells through the widget configuration.

    Please see this demo form: 61441655557965 

  • PVRN
    Replied on February 14, 2020 at 8:59 AM

    I created a spreadsheet inside my form. https://eu.jotform.com/build/193625435816363

    At the end of the form you see a table with First Name/Last Name/Dinner.

    The idea is that the price is entered in Dinner (60€).

    I would like to sum the dinners in the totalfield: #input_146.

    So how can I address colomn 3 (Dinner) and rows 1-2-3-4-5?

  • Girish JotForm Support
    Replied on February 14, 2020 at 10:32 AM

    I'm afraid that the Spreadsheet widget value cannot be passed on onto the Form Calculation widget i.e. #input_146.


    For the requirement that you have specified, you can use an Input table matrix instead of the Spreadsheet widget. Set the fields as Textbox:

    15816940111402 27 Screenshot 10

    Now in the Form Calculation widget, add the input table for calculation as shown below:

    1581694213screencast140220 6 Screenshot 21

    Related Guide: https://www.jotform.com/help/343-How-to-Perform-Form-Calculation-in-the-Input-Table-Field 

    Here is a demo cloned form: https://form.jotform.com/200444025931950 

    Please check and you can clone it if required: https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL