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

  • Profile Image
    Joe Cohn 
    Asked on March 07, 2018 at 04: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?

  • Profile Image
    Adrian
    Answered on March 07, 2018 at 04: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".

    152045913901.png

    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.

    152045926202.png

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

    152045936003.png

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


    Let us know if you need further assistance.

  • Profile Image
    joecohn
    Answered on March 08, 2018 at 01: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.



  • Profile Image
    Adrian
    Answered on March 08, 2018 at 02: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.png

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

    1520536608fs.png

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

    I hope this helps.