Contact form changes - Debut Theme

Solved
Highlighted
New Member
5 0 0

Hey! This is how my contact form looks like right now: Where it says "Telefonnummer" (means phone number, it's in swedish), I would rather have order number (Ordernummer in Swedish), and I have no idea how to change this.
Someone that can guide me?

Skärmavbild 2020-01-22 kl. 23.15.09.png

All i know is that page.contact.liquid is the code that controls this. But what to change and so on i have no clue

My code:
Skärmavbild 2020-01-22 kl. 23.23.14.png

0 Likes
Highlighted
New Member
5 0 0

No one?

0 Likes
Highlighted
Shopify Partner
424 59 120

If you go to, Online Store > Themes & in the actions dropdown select Edit Languages and then select the Contact tab. You should find it in there.

 

Here's a screen shot of mine. Mine is obviously in English, yours presumably is in Swedish.

 

Screenshot 2020-01-23 at 10.50.27.jpg

If helpful then please Like and Accept Solution
0 Likes
Highlighted
New Member
5 0 0

Is it a good idea to just change the phone number translation to order number? Instead of editing the code? I mean the code will still be showing that its a phone number.
What do you think?

0 Likes
Highlighted
New Member
5 0 0

Also if i change the translation "phone" to "order number" will it change it everywhere on my site? 

0 Likes
Highlighted
Shopify Partner
424 59 120

Hi - answer to both questions:

 

- In terms of the code still thinking it is a phone number then I think the only potential issue is validation. In your page.contact.liquid file you will see this 'pattern="[0-9\-]*' which is the validation applied to that field. You may need to change this if your order numbers don't follow that

- This only changes the wording used on your Contact Form, so not elsewhere on your website

If helpful then please Like and Accept Solution
0 Likes
New Member
5 0 0

Do you know how i can change the coding instead? From phone number to order number.

The phone number code is currently looking like this:

<label for="{{ formId }}-phone">{{ 'contact.form.phone' | t }} </label>
<input type="tel" id="{{ formId }}-phone" name="contact[phone]" pattern="[0-9\-]*" value="{% if form[phone] %}{{ form[phone] }}{% elsif customer %}{{ customer.phone }}{% endif %}">

0 Likes
Highlighted

Success.

Shopify Partner
424 59 120

Yes, rather than try and change that code though I would just add a custom field (you could then just comment out the telephone field if you don't want to show it). Fortunately Shopify have an article on how to do this which probably explains it better than I could. https://help.shopify.com/en/themes/customization/forms/add-fields-to-your-contact-form

 

Hope that helps.

If helpful then please Like and Accept Solution
0 Likes