Contact Form: Modify telephone format to accept plus symbol
The contact form in Pipeline uses standard telephone form format for accepting phone numbers. The form will not accept the "+" symbol which some customers might try and add in the beginning. If you wish to modify the code to accept the "+" symbol, you can change one line of code in the form.
The file to modify is:
Find this line of code:
Line of code to replace:
<input type="tel" id="ContactFormPhone" name="contact[{{ name_attr }}]" placeholder="{{ 'contact.form.phone' | t }}" pattern="[0-9\-]*" value="{% if form[name_attr] %}{{ form[name_attr] }}{% elsif customer %}{{ customer.phone }}{% endif %}">
Replace with this new line of code:
<input type="tel" id="ContactFormPhone" name="contact[{{ name_attr }}]" placeholder="{{ 'contact.form.phone' | t }}" pattern="[\d\-\)\(\+ ]+" value="{% if form[name_attr] %}{{ form[name_attr] }}{% elsif customer %}{{ customer.phone }}{% endif %}">
Save the file.
Undo
Use the Older versions link at the top of the file if you need to rollback or undo this code change.