Hi!
Im using the Craft theme, and I would like to make the fields “name, phone number and message” as required to fill in. Do I need to edit code?
Thanks a lot!
Goal: Make specific fields (name, phone number, message) required in the Shopify Craft theme contact form, and adjust label indicators.
What was done:
Follow-up requests:
References and assets:
Status: Initial requirement solved; email optionality remains unclear/unfinished.
Hi!
Im using the Craft theme, and I would like to make the fields “name, phone number and message” as required to fill in. Do I need to edit code?
Thanks a lot!
Hi @estherfung ,
You have to add the word required for each inputs and the textarea. Please follow instructions below
From your Admin Page, click Online Store > Themes >Actions > Edit code
In the Section folder, open the contact-form.liquid
Find the all <input, except the input with autocomplete, and add the word required. Refer to the image below.
Do this with the <textarea as well. Follow the image above for placement, make sure to add spaces.
Click SAVE
Thank you so much! It works ![]()
Could I also ask, how to cancel the required filled in for Email? and to add * on other fills?
Hey, I was able to do this for my own shop by going to Theme Content and searching contact in the search bar, then scrolling all the way to the bottom to Templates and Contact Form and add a space and asterisk next to Name part. This matched the spacing and design of the email one for me. Nothing should need to be done in the email section even though it does not show an asterisk. Hope this helps
Hi @estherfung , need a quick fix for making contact page form fields required in Shopify’s Dawn theme? Check out this short and informative YouTube video: https://www.youtube.com/watch?v=0LI7iyHABpo