numerical input on mobile
-
Hello,
Is there a way to add an attribute to the shortcode to open up the number dialpad on phones when entering a custom amount?
I added a shortcode from your example:
[accept_stripe_payment price=”0″ name=”Another test donation” button_text=”Custom Amount” description=”This is a custom description that will show in the payment window”]It works, but when clicking on the field, you have to use the numbers that are at the top of the keyboard on the phone. Instead, I’d like to use the numeric pad where it’s larger and only use the numbers like this one:
https://www.filamentgroup.com/images/number-blog-post/ios-9-type-text-pattern.png
What’s below works, of course, but not with the shortcode.
<input inputmode=”numeric” pattern=”[0-9]*” type=”text” name=”creditcard”>Since it’s an empty field, and it’s ONLY to capture the amount, there’s no need for any letter, and ONLY numbers, so in this case, I’d say it’d be acceptable to have the keyboard on phones use the numeric pad (which is much larger and better for small touch screens).
I just have NO way of knowing in how to add that to the shortcode.
Would you KINDLY help me?
Thank you in advance.
- The topic ‘numerical input on mobile’ is closed to new replies.