Jump to content

Phone field in forms

Go to solution Solved by paul2009,

Recommended Posts

  • Solution
Posted

You cannot change the format of the phone field but you can use a Text field instead 🙂

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

  • 2 months later...
Posted

You can also change the text field with a tel field and custom pattern, you can't change the type with squarespace but you can override it.

  1. Create a normal txt input on your form
  2. copy the id of the input field (through right click -> inspect)
  3. open the settings of the page then advanced
  4. paste the follow code and replace YOUR-ID with the ID you copied
<script src="https://code.jquery.com/jquery-3.6.1.min.js" integrity="sha256-o88AwQnZB+VDvE9tvIXrMQaPlFFSUTR+nldQm1LuPXQ=" crossorigin="anonymous"></script>
<script>
  $( document ).ready(function() {
    $('#YOUR-ID').attr("type", "tel");
	$('#YOUR-ID').attr("pattern", "[0-9]{11}");
	});
</script>

You can change the pattern to match what you prefer

link

  • 4 months later...
Posted

Hi Squarespace community,

Does anyone know how to change the format of the Phone form field?

The forms seems fixed to the attached format of: (###) ### ###
Though here in Australia, mobile numbers are written as: #### ### ###
or with country code included: (##) ### ### ### 

Can I change the field formats to suit Australia's standard?

Thanks for your help 🙂

Squarespace Phone Field Format.png

Posted
On 2/8/2023 at 6:04 AM, JeremyDVBoyd said:

Hi Squarespace community,

Does anyone know how to change the format of the Phone form field?

The forms seems fixed to the attached format of: (###) ### ###
Though here in Australia, mobile numbers are written as: #### ### ###
or with country code included: (##) ### ### ### 

Can I change the field formats to suit Australia's standard?

Thanks for your help 🙂

Squarespace Phone Field Format.png

If you haven't solved it yet, you can consider using Text Field instead..

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.