Vote count:
0
Just trying to validate some custom parameters passed before Stripe Checkout
<%= form_tag charges_path, class: 'stripeform' do %>
<input type="text" spellcheck="off" placeholder="First Name" name="first_name" class="name" required>
<input type="text" spellcheck="off" placeholder="Last Name" name="last_name" class="name" required>
<input type="checkbox" id="checkbox" required> I accept the <u>Terms and Conditions</u>
<button id="submitter">
<script src="http://ift.tt/1doUtf9" class="stripe-button"
data-key="<%= Rails.configuration.stripe[:publishable_key] %>"
data-label="Pay"
data-panel-label="Pay"</script>
</button>
<% end %>
No validations occur when I click on the Stripe button.
The validations only occur when I click on the button id="submitter" that is behind it:
I do not want the button behind it. I want the Stripe button to validate the fields. How to do this, given that the Stripe's button's HTML is generated?
asked 11 secs ago
Form Validations and Stripe Checkout
Aucun commentaire:
Enregistrer un commentaire