Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Form Field: PHONE - way to have a numeric entry keypad?


seattleyoga
Go to solution Solved by dimsk,

Question

Is there a way to have the Squarespace's form have a numeric entry keypad (#0-9) when entering numbers on a mobile device? Instead of having the full keyboard, it would swap into a numeric entry keypad when clicking onto the phone number line. I've tried using the "Numbers" field too, and that doesn't work.

Is there a custom html code that can be integrated into Squarespace to allow this?

Edited by seattleyoga
Initial Revision
Link to post
  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

1 answer to this question

Recommended Posts

  • 0

Hey

This depends a bit what type of field you are using. For the usual phone number and number field, add this into the footer Code Injection


<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
 $('.three-digits .field-element').attr("type", "number");
 $('.number .field-element').attr("type", "number");
</script>


Hope that helps someone!

Link to post
Guest
This topic is now closed to further replies.

×
×
  • Create New...