What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Can the quantity field of a Paypal item be tied to another field?

    Asked by marketingalliance on November 30, 2016 at 09:28 AM

    I'm using a combination of the Quantity widget and a PayPal payment field to track the number of tickets available for an event. Can the quantity dropdown on the Quantity widget be tied to the quantity dropdown on the PayPal widget, so they mirror each other? I'm trying to avoid a situation where someone reserves twenty tickets and only pays for one.

    quantity another item
  • Profile Image
    JotForm Support

    Answered by Charlie on November 30, 2016 at 11:28 AM

    I'm sorry to say, but it is not possible to pass a value on the quantity field of the payment field if you are setting up products to sell.

    What I can recommend is recreating the products using the default fields like text boxes, drop down field, etc... and then create a calculation based on the quantity selected in the Inventory widget. 

    Here's a sample form that I have: https://form.jotform.com/63344735719968. Here are the steps on how I setup mine:

    1. First, I added a form calculation widget, this will fetched the quantity selected in the "Available tickets" widget and multiply it with 20.

    2. Here's how the formula in the form calculation widget is setup:

    To learn more about the calculation using the form calculation widget, you can check this guide: https://www.jotform.com/help/259-How-to-Perform-Calculation-in-the-Form 

     

    3. Now I see you have two payment methods, one is the invoice/check and the other is Paypal. You will need to have 2 form calculation widgets that will hold the final total price depending on the payment option selected. 

     

    4. Now those final total fields will NOT have a formula inside the widget itself. We will insert values on them using the Conditional logic. Here's a guide about conditional logic: https://www.jotform.com/help/57-Smart-Forms-Using-Conditional-Logic. Here are the conditions specific to my final total fields:

     

     

    Here's how it is specifically setup, below I am stating that if the payment option is "Paypal", then insert the calculated price from the "Form Calculation widget (Available tickets selected * 20)" to the "Final Total (Paypal)" field widget:

     

    Here's the specific guide on how to insert calculations using Conditional logic: https://www.jotform.com/help/268-How-to-Insert-Text-or-Mathematical-Calculation-into-a-Field-Using-Conditional-Logic 

    If you wish to assign calculation values on your drop down, check box or radio button fields, then you can do that by following this guide: https://www.jotform.com/help/301-How-to-Assign-Calculation-Value 

     

    5. Now we want to pass the final total to our Payment wizard, that is possible by selecting the "User Defined Amount" in "Payment Type". After that, you need to select the field where you need to fetch the final total in the "Get Price From" option: 

    Here's a guide to better help: https://www.jotform.com/help/275-How-to-Pass-a-Calculation-to-a-Payment-Field 

     

    With that, whatever option selected in the "Inventory" widget, it should automatically calculate the price and pass it to some fields, even on the payment wizard. You can setup more advance or complex calculations using this approach.

    I hope that helps. 

  • Profile Image
    JotForm Support

    Answered by Charlie on November 30, 2016 at 11:29 AM

    Apologies. I shared a different link. Here's my cloned form with the edits I made, this is based on your original form: https://form.jotform.com/63344735719968