permitting a + sign in the phone field in the contact page

Topic summary

A user developed a contact page where the phone field only accepted numbers, but needed to allow the ‘+’ sign for international phone numbers.

Solution provided:

  • Navigate to: Store Admin → Sales Channels → Online Store → Themes → “…” → Edit Code
  • Open the contact-form.liquid file
  • Locate the pattern attribute: pattern="[0-9\-\+]*"
  • Replace it with: pattern="[0-9\-]*"
  • Save the file

Outcome:
The solution was successfully implemented and resolved the issue. The user confirmed it worked and thanked the responder for the quick assistance.

Summarized with AI on November 4. AI used: claude-sonnet-4-5-20250929.

Hello,

So I just developed a contact page and I noticed under the phone field only numbers can be entered. I need also for the ‘+’ sign to be accepted as an entry to the field, could someone support?

Preview Link: https://rsofdh7tau5pw7xu-60642623567.shopifypreview.com

Click on contact at the header to enter the page if needed.

Hi @Omarcajo

Please go to your store admin > Sale channels > Online Store > Themes > click “…” > Edit code > open contact-form.liquid file, find this line of code

pattern="[0-9\-]*"

Replace it with this code

pattern="[0-9\-\+]*"

Save your file and check again.

1 Like

Hi Dan, this worked, thank you so much for your quick response.

1 Like

You are very welcome!