Preventing Payment form from sending if no product selected

  • WSIguy
    Asked on December 2, 2018 at 8:13 AM

    Hi,

    Using the Square Payment widget, a user was able to send the form without a product selected (and no amount for payment).

    Is the fix for this as simple as making the Payment widget field "required"?
    I note that it is not presently set to "required".

    Please advise.

    Best regards,

    Bruce

  • Victoria_K
    Replied on December 2, 2018 at 1:03 PM

    Hello Bruce,

    You are right, payment fields are not set as required by default. So, it is possible to leave it blank and submit a form. 

    I am not sure which form you refer to, but you can set the field required via field properties: 

    1543773801o9yex Screenshot 10

    Please let us know if you have other questions.

  • WSIguy
    Replied on December 2, 2018 at 8:31 PM

    Thanks Victoria,

    To clarify, I don't suspect a big or anything. But wanted to confirm that simply making the Payment Widget field "required" will solve the issue.
    I mean, if someone checks a box and adds a quantity greater than 1, but then unchecks the box... the widget would have a value of zero (0).
    But other fields would not be "empty".
    If empty means, "no boxes checked", then it should work okay.

    I was looking for support's expertise to let me know it should function as expected by merely making it "required". In actuality, we don't want the form to be sent if the value is zero.

    Please confirm.

    Best regards,

    Bruce

  • Ashwin JotForm Support
    Replied on December 3, 2018 at 2:50 AM

    we don't want the form to be sent if the value is zero.

    That means you do not want users to submit form without payment. Is that correct?

    Then the best way possible to achieve this is making the payment tool a required field as explained by my colleague above. You can mark the payment tool as required field and users will not be able to submit form with the product being selected even if the quantity is selected. Please check the screenshot below:

    1543823373payment1 Screenshot 10

    Hope this helps.

    Do get back to us if you have any questions.