How can I use the add more widget with payment form to dynamically set the price

  • Joe Cohn
    Asked on March 7, 2018 at 4:01 PM

    I want to set up a simple registration form. I want the user to be able to add as many registrants. So I would like to use the add more widget Something like this

    https://widgets.jotform.com/widget/matrix_dynamique


    Where the price would change (fixed price multiplied by number of entries) based on number of entries.

    Is that doable? Best way to accomplish this?

  • Adrian
    Replied on March 7, 2018 at 4:50 PM

    You can achieve this by using the Dynamic Textbox Widget and the Form Calculation Widget.
    (The Matrix Dynamique Widget cannot be used for calculations)

    I have made a simple DEMO for you. https://form.jotform.com/80656642603962

    1. Add the Dynamic Textbox Widget to your form. Set the "Count textboxes?" option to "Yes".

    How can I use the add more widget with payment form to dynamically set the price Image 10

    2. Add a Form Calculation Widget to your form. Make the calculation expression that you need. In my case, I am just multiplying the "Members" (Dynamix Textbox Rows) by 10.

    How can I use the add more widget with payment form to dynamically set the price Image 21

    3. Set the Payment Type on your Payment Gateway to User Defined Amount. Set the Get Price From to the Form Calculation Widget field.

    How can I use the add more widget with payment form to dynamically set the price Image 32

    Complete Guide: How to Pass a Calculation to a Payment Field


    Let us know if you need further assistance.

  • joecohn
    Replied on March 8, 2018 at 1:55 PM

    I don't this solution works for me.

    This is only allowing one field to be cloned or added in add more. We are looking for all the fields to be presented when someone clicks add more.

    Basically this is for a league registration form. Where parents can sign up their kids. There are a few questions that need to be answered for each child (first name, last name, age, grade etc)

    We then want to charge based on how many children they are registering.



  • Adrian
    Replied on March 8, 2018 at 2:17 PM

    The Infinite List Widget allows multiple entries with multiple text fields and you can use it in calculations. The downside to this is that it only supports text fields.

    1520536580ilist Screenshot 10

    DEMO: https://form.jotform.com/80665117642962

    1520536608fs Screenshot 21

    Similarly, you can use the Form Calculation Widget to calculate the total and pass it to the Payment Integration.

    I hope this helps.