How can I make the credit card payment section optional?

  • Profile Image
    geneseepharmacists
    Asked on November 28, 2012 at 09:04 AM

    I created a form for health care providers of my organization to register for a program.  If they are a member, it is free.  But if they are not a member, there is a cost association, and therefore my form needed a payment integration (Stripe in this case).  Unfortunately, for the members that do not have to pay, the for is still requiring them to fill in the Credit Card information.  I have made that section optional, but even if it is skipped over (no item checked), it still is requiring the user to fill out the payment section.  

    Thanks in advance!

  • Profile Image
    fxr
    Answered on November 28, 2012 at 09:39 AM

    This is a suggestion for a workaround

    --

    Make these options in a radio button:

    CE Ticket MPA Member Free
    CE Ticket Non-MPA Member $20.00 USD

    --

    Then use a condition to show your payment field if the 2nd option is chosen.  The form will only redirect to the payment provider if the payment field is shown on the form.

    --

    I dont have a Stripe account but can show a basic example with Google Checkout (it should work just the same with Stripe)

    1. Create your form fields a bit like this:

     

    NOTE: its important to add the 'Dummy' product to prevent the form going to the payment gateway.

    2. Set up a condition to show your 'My Products' (payment) field when the  CE Ticket Non-MPA Member $20.00 USD option is selected.

     

     3. Hide the 'Dummy' product with CSS.

    To do this you have to get the CSS element id of the product. In Chrome, this is straightforward enough, right click on the field with form on a webpage and select -> Inspect Element.

     

    You can the id of my product is  input_3_1002.

    I then inject the custom CSS#input_3_1002, #input_3_1002 + label {display:none;} into my form.

     

    --

     

    And you are done.

    You can see my example form here:

    http://form.jotformeu.com/form/23324160633343

     

    --

    If you select the top option you do not get redirected to the payment provider for payment.

    --

    I realise this is a little complex, but it should work well and honestly wont be that hard to set up. If you need any help working out the CSS element id of your form, let us know and we can get it for you.