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.
Why submit button not working on the form when Credit card option is not selected?Asked by traditionsevents1 on October 10, 2016 at 11:59 AM
Submit button not working on the form when Credit card option is not selected. When Submit button is clicked, it just shows same page but not submitting form
credit card selected button not working
I checked your form and the problem is in payment field. This is what happens when you try to submit your form by choosing cash:
As you can see, since you have payment field in your form that is required it is throwing that error. For example, if you try removing Square payment field you will see that you're able to submit. So you can either make that field not required, or you can follow this guide on how to create multiple payment form by using iFrame embed widget.
For example, you can create one form that will be just Square payment field and embed it in your main form where you will show it by using conditions.
If you have further questions or need any assistance please let us know.
i made the credit card payment fields as not required and now able to submit form with both credit card and cash options
it when users pay with their credit card, it's submitting form but we are. It actually getting he payment, and their credit card account is not charged as well
All the form conditions looks correct, but somehow credit card information entered is not actually charged and this worked fine before
I'm sorry, I'm confused with the last statement:
"...but somehow credit card information entered is not actually charged and this worked fine before"
What do you mean on this? You are filling out the form and adding your credit card details as the payment, but your credit card is not charged? May we know if there's an error you are seeing?
I also made a test submission on your form and was able to successfully submit it when I choose the "Cash" option:
You can also make fields required based on user inputs, here's a guide about it: https://www.jotform.com/help/367-How-to-Make-a-Field-Required-Based-on-Another-Field-Selection-or-Input
I checked your form and this is what I saw, in your submissions, the payment is "Credit Card", but noticed that the "Total Contribution" is blank:
This is why your submission is going through without charging your users. Because there's no actual value to charge, the basis of the charge is in the "Total Contribution". Why is the "Total Contribution" not getting a value? This is because you have 3 ways on assigning the value on it, which are conflicting one another causing a blank value.
1. First, you are assigning the value directly in the payment integration:
Now that is actually correct, this is the preferred way to pass a calculated price to your payment integrations total field. It is mentioned on this guide: https://www.jotform.com/help/275-How-to-Pass-a-Calculation-to-a-Payment-Field
2. However, you have two conditional logic that are trying to insert a value on the "Total Contribution":
That's causing the conflict on your end. The payment integration is set to fetch a value from a form calculation widget, but you are trying to assign a value using conditions.
What to do to fix this? You'll need to have two separate conditional logic to where to put the total prices. Here's how:
1. First, add two form calculation widgets for the calculated total price. The two will depend on the payment method the user chooses. We have a form calculation for the cash and a form calculation for the credit card.
2. Make sure they do NOT have a formula on them.
3. Now we will assign a value on them based on a conditional logic. I have two conditional logic:
IF payment method is "Cash/Cheque" then insert calculated price to "Total contribution Amount (Cash)"
IF payment method is "Credit Card" then insert calculated price to "Total contribution Amount (Credit Card)"
4. Condition #1, this is where the calculation happens. It inserts the calculated value to the appropriate widget.
5. Condition #2, this is for the credit card setup.
6. In your payment integration, make sure that you are assigning the "Get Price From" to the correct form calculation widget for the credit card total.
This is how it looks like after those changes:
You'll noticed that the total price is inserted to the appropriate widget depending on the payment method. You'll see that the payment integration's "Total Contribution" now have a value. You can of course hide the said totals, you can also update the labels. The important thing is to setup separate totals for separate payment methods.
I hope that helps.
Thanks for the detailed explanation, credit card option is working fine now after following provided steps
Now, when we select Cash option, I have added a condition to disable payment field, but when submitting form with Cash option, it's still expecting payment details to be entered, and not allowing to submit the form.
Payment field is not a required field
I tested you form and I was able to replicate this error. Please allow me some time to investigate this problem and I will get back to you as soon as possible.
Thank you for your patience.
Sure, thanks for the response. We are planning to buy the Bronze subscription service once the form is working.
Please resolve the issue soon
I checked your form and I was able to replicate the issue you are reporting. The "Credit card number is not valid" error is displayed even I have selected the Cash option.
The error is displayed because there is an amount set to be paid for the payment field so it will require the Credit Card information fields. You need to set the amount on the Payment Field to 0 so it will not require the credit card information. Please add this following condition to your form to set the Payment Field amount to 0 to fix the issue.
You can also check this sample cloned form that I have used for testing: https://www.jotformpro.com/form/62985023364964.
Do let us know if you need further assistance.
This is working fine now, thanks for your help
On behalf of my colleague, you're welcome.
Please let us know if you have further questions.