Make "create account" fields REQUIRED - Theme Venture

Solved
Highlighted
Excursionist
34 0 5

Hello everyone, my theme is Venture but it has been customized. I talked to a Shopify customer service rep on Oct. 7. They helped me add a couple fields to the "create account" section of my website. They added, Emergency first, last, phone and having to create your password 2x. Although, none of the fields are REQUIRED. I need them required. 

I found the code in my theme file. How do I make the fields required? Thanks

customers/register.liquid

Here is a piece of it.

<label for="EmergencyContactFirst" class="label--hidden">Emergency Contact (First Name)</label>
<input
type="text"
id="CustomerFormEmergencyFirst"
name="customer[note][emergency_first_name]"
placeholder="Emergency Contact (First Name)"
/>

0 Likes
Highlighted

This is an accepted solution.

Just add required after the input

<input
required
type="text"
id="CustomerFormEmergencyFirst"
name="customer[note][emergency_first_name]"
placeholder="Emergency Contact (First Name)"
/>

 

◦ Problem Solved? ✔️ Please click on Accept as Solution and like.
◦ Needing urgent help? I am currently available for hire, same day response guaranteed: diego.boarutto.fortes@gmail.com
Highlighted
Excursionist
34 0 5

Thank you. That worked.

0 Likes
Highlighted

@Dgoldfe13 

You're welcome! 

Next time feel free to contact me personally, I'll be prompt and happy to help.

Kind regards,
Diego

◦ Problem Solved? ✔️ Please click on Accept as Solution and like.
◦ Needing urgent help? I am currently available for hire, same day response guaranteed: diego.boarutto.fortes@gmail.com
Highlighted
Excursionist
34 0 5

If I wanted to add a phone number collection. What would the code be for that? Here is what I have for First name collection. 

<label for="FirstName" class="label--hidden">{{ 'customer.register.first_name' | t }}</label>
<input required type="text" name="customer[first_name]" id="FirstName" placeholder="{{ 'customer.register.first_name' | t }}" {% if form.first_name %}value="{{ form.first_name }}"{% endif %} autofocus>

0 Likes
Highlighted
Excursionist
34 0 5

I figured it out. I just copy and pasted the emergency contact phone code and changed it to "contact phone"