Solved

Taste Theme: Add new field to a contact form

liambeauchamp
Excursionist
25 2 5

Hi!

 

I would like to add a new field in my contact form so that people can tell me their order number if they've placed an order. The field title should be 'Order Number (If applicable) and I want it to sit under the Phone Number field. This is the page with an example of the contact form:

 

https://batchedcookies.co.uk/pages/contact-us

 

Is there some code I can add to enable this? 

 

Thanks,

Liam

Accepted Solution (1)

Sweet_Savior_3
Shopify Partner
1158 94 112

This is an accepted solution.

Hello @liambeauchamp 

 

Welcome to Shopify Community.

 

Yes, you can add an extra field to the contact form.

 

1. Find the contact form section/snippet from the theme editor.

2. Add below code to show a new field for Order number.

<div class="field">
<input type="number" id="ContactForm-order_number" class="field__input" autocomplete="number" name="contact[Order number]" value="" placeholder="Order Number">
<label class="field__label" for="ContactForm-order_number">Order Number</label>
</div>

3. Save and Test.

 

Thanks

Don't forget to like and accept the solution to help others store owners.
Looking for an expert or Have any queries ? Send query to the Inbox
Coffee Tip ? Pay to shopify.dev.34@gmail.com
From Less To Further !!!

View solution in original post

Replies 2 (2)

Sweet_Savior_3
Shopify Partner
1158 94 112

This is an accepted solution.

Hello @liambeauchamp 

 

Welcome to Shopify Community.

 

Yes, you can add an extra field to the contact form.

 

1. Find the contact form section/snippet from the theme editor.

2. Add below code to show a new field for Order number.

<div class="field">
<input type="number" id="ContactForm-order_number" class="field__input" autocomplete="number" name="contact[Order number]" value="" placeholder="Order Number">
<label class="field__label" for="ContactForm-order_number">Order Number</label>
</div>

3. Save and Test.

 

Thanks

Don't forget to like and accept the solution to help others store owners.
Looking for an expert or Have any queries ? Send query to the Inbox
Coffee Tip ? Pay to shopify.dev.34@gmail.com
From Less To Further !!!
liambeauchamp
Excursionist
25 2 5

Thank you for your response - that worked perfectly 🙂