Easy way to change the total on a paypal purchase

  • eman_no1
    Asked on August 2, 2014 at 3:21 PM

    Hello,

    I am making a form to enroll students. The form allows for up to 3 students, how do I make a javascript that checks the first and last name for students 2 and 3 and increments the enrollment total accordingly.

    Example Form:

    Student 1: $135

    Student 2: Has First Name == True & Has Last Name == True: Add $135

    Student 3: Has First Name == False & Has Last Name == False: Add $0

    Total $270

     

    Thanks,

     

    - Erik

  • Welvin Support Team Lead
    Replied on August 2, 2014 at 5:41 PM

    Hi Erik,

    Please check this clone version of your form: http://www.jotformpro.com/form/42136447455961. You'll noticed the textbox fields and the calculation widget at the bottom. Fill the second and third child's name. You'll see the results in the Payment box.

    Let me know if this is what you are trying to do so I can give you the steps.

    Thanks

  • eman_no1
    Replied on August 2, 2014 at 11:23 PM

    Thanks Welvin, that is exactly what I am looking for.

    -Erik

  • Welvin Support Team Lead
    Replied on August 3, 2014 at 3:34 AM

    You can have the same by following the steps below:

    1. Add two Textboxes to the form

    2. Add a conditional logic to insert a number to these fields. You have to add a separate logic to each child (2nd and 3rd). Please refer to this guide: https://www.jotform.com/help/268-How-to-Insert-Text-or-Mathematical-Caculation-into-a-field-using-a-Condition. The conditional logic should be "IS FILLED", for example:

    Easy way to change the total on a paypal purchase Image 1 Screenshot 40

    3. Add the Calculation Widget. In the calculation section, simply sum up the two textboxes + 135 for the first child (by default). See screenshot:

    Easy way to change the total on a paypal purchase Image 2 Screenshot 51

     

    4. Lastly, run the payment wizard and make sure to select "Donation" then get the amount from the calculation. Check this visual guide:

    Easy way to change the total on a paypal purchase Image 3 Screenshot 62

     

    That's it! You're done! You can also simply clone my form above by following this guide: https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL and use it.

    If you require any further assistance, feel free to let us know here!

    Thank you!