Conditional logic and PayPal product selection

  • LS_Launch
    Asked on May 11, 2017 at 11:45 AM

    Hi, I noticed in 2012 someone was trying to do something I am trying to do. You were able to help him by embedding a script into his form. I'm wondering if you can help me out in a similar way. When my user gets to my PayPal widget, it is up to him to choose the PayPal products he said he was going to choose in the form. What I am looking for is a way to force the PayPal product selection to match his selections in the form... to remove his ability to not pay for what he says he is going to purchase. Could you help me with this?

    Form Name: Packing Party Tickets

    Conditions:

    If user selects "Buy my Own Ticket or Redeem a Gift Ticket" on question=What do you want to do?, then force select "Graduate Ticket $15" product in the PayPal widget If that same user then selects "yes" for question=Will your mother attend with you for an additional $10?, then add "Mother Ticket $10" to the product selection. So, this user would have two products selected. (If the user selects "no" for that question, nothing needs to happen.) If user selects "Buy Gift Ticket for someone else" on question=What do you want to do?, then select "Gift Tickets $15" and use the number entered for question=Number of Tickets you want to purchase to fill in the quantity. Also, I would like the user to not be able to change the answers on that page. I want them completely forced by what they enter in the body of the form.

    Given all that you know I am trying to do, is there a better way to employ the PayPal widget than using Products? 

    Thanks for the help!

    -Jenifer

  • Nik_C
    Replied on May 11, 2017 at 1:24 PM

    So the issue basically is that your users select what they want to buy on the first page and you want to be sure that they will choose the product on the payment page

    Conditional logic and PayPal product selection Image 1 Screenshot 30

    Conditional logic and PayPal product selection Image 2 Screenshot 41

    Just clarify please, if the first option is selected (first screenshot) what should be selected in the second screenshot?

    And just for your information, it is not allowed to insert script code to the form because of the security issues.

    But, if you need what I described above, it is doable with conditions and some other changes, just confirm, what should be selected in payment when "What do you want to do" is selected, for each option.

    We'll wait for your response.

    Thank you!

  • LS_Launch
    Replied on May 11, 2017 at 1:44 PM
    Thanks for the quick response, Nik_C. I tried to figure this out with conditions, not sure what I missed. So, Thanks for helping me out! I will try to explain my conditions well. Hopefully I’m successful :)
    To answer your question below:
    If the first option (Buy my Own Ticket…) is selected on first screenshot, then, I’d like the First product (Graduate Ticket $15) selected on the second screenshot.
    If the second option (Buy Gift Ticket…) is selected on the first screenshot, then I’d like the Third product (Gift Tickets $15) selected on the second screenshot.
    I have two more conditions, though…
    When “Buy my own ticket" is selected on the first screenshot, at some point later, the user will identify whether or not her mother will be attending with her.
    If she chooses “no”, nothing needs to happen, but if she chooses “yes”, the Second product (Mother Ticket $10) needs to be checked on your second screenshot.
    When “Buy Gift Ticket” is selected on your first screenshot, the user will eventually be identifying how many tickets.
    This number needs to go into the Quantity box below “Gift Tickets” on the second screenshot.
    Does this all make sense? Again, thank you for your help. This is a really powerful tool you have. I do a lot of work for non-profit organizations and used to rely heavily on Google Forms. JotForms is SOOO much better. Love it!
    -Jenifer
    ...
  • Nik_C
    Replied on May 11, 2017 at 2:19 PM

    Thank you for an explanation. It is helpful. I would say it is doable, but let me check this more and I'll get back to you as soon as I finish.

    Thank you!

  • LS_Launch
    Replied on May 11, 2017 at 2:44 PM
    Great! Thanks, Nik_C!
    ...
  • Nik_C
    Replied on May 11, 2017 at 2:52 PM

    Ok, I think I got it.

    I clone your form and did some changes there. First I created your products by using the regular radio buttons and assigned calculation values to them so we can use it for the price:

    Conditional logic and PayPal product selection Image 1 Screenshot 100

    Then I created conditions that will select each radio button option (product) when the conditions are met, what you described above.

    Here are conditions for each situation:

    If only second option is chosen:

    Conditional logic and PayPal product selection Image 2 Screenshot 111

    The first option is chosen plus mother selection selected to No:

    Conditional logic and PayPal product selection Image 3 Screenshot 122

    The first option is chosen but mother option selected to Yes:

    Conditional logic and PayPal product selection Image 4 Screenshot 133

    So with each option, appropriate radio button will be selected.

    Now we need to calculate the price, I added one Form calculations widget:

    Conditional logic and PayPal product selection Image 5 Screenshot 144

    And I added one number field (Gift tickets Quantity) that we can use for Quantity for Gift tickets option.

    Here are the conditions that will do the calculations:

    Conditional logic and PayPal product selection Image 6 Screenshot 155

    If the third product is selected it will be multiplied with Quantity field.

    Finally the price from product calculations field we can pass to payment field:

    Conditional logic and PayPal product selection Image 7 Screenshot 166

    What I would do additionally, I would make product radio button options read-only, so they can not change that. And you can hide the product calculation field since the price will be shown any way in the payment field.

    Conditional logic and PayPal product selection Image 8 Screenshot 177

    Conditional logic and PayPal product selection Image 9 Screenshot 188

    Here is my clone of your form so you can check how it works:

    https://form.jotformpro.com/71305449392963

    Hope that is what you had in mind. Please check and let us know your thoughts.

    Thank you!

  • LS_Launch
    Replied on May 11, 2017 at 5:43 PM
    Great! I edited my form to mimic yours… and I learned a couple things in the process :)
    Have a great day!
    -jenifer
    ...