Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hey All,
Wondering if anyone has any thought on how to add the first_name and last_name to the new dawn 2.0 theme.
the code is as followed, I thought I would need to add
{form.first_name} and {form.last_name} plus contact[first_name] and contact[last_name] and change the input to text (with some other formating issues), but i cant see to get it to fire.
see code below:
Solved! Go to the solution
This is an accepted solution.
Hi @Chris_Sydney,
You can add these 2 fields:
<div class="field">
<input class="field__input" autocomplete="name" type="text" id="ContactForm-first_name" name="contact[{{ 'customer.register.first_name' | t }}]" value="{% if form.first_name %}{{ form.first_name }}{% elsif customer %}{{ customer.first_name }}{% endif %}" placeholder="{{ 'customer.register.first_name' | t }}">
<label class="field__label" for="ContactForm-first_name">{{ 'customer.register.first_name' | t }}</label>
</div>
<div class="field">
<input class="field__input" autocomplete="name" type="text" id="ContactForm-last_name" name="contact[{{ 'customer.register.last_name' | t }}]" value="{% if form.first_name %}{{ form.last_name }}{% elsif customer %}{{ customer.last_name }}{% endif %}" placeholder="{{ 'customer.register.last_name' | t }}">
<label class="field__label" for="ContactForm-last_name">{{ 'customer.register.last_name' | t }}</label>
</div>
Hope it helps!
Please mark as a solution if you find my answer helpful for you.
This is an accepted solution.
Hi @Chris_Sydney,
You can add these 2 fields:
<div class="field">
<input class="field__input" autocomplete="name" type="text" id="ContactForm-first_name" name="contact[{{ 'customer.register.first_name' | t }}]" value="{% if form.first_name %}{{ form.first_name }}{% elsif customer %}{{ customer.first_name }}{% endif %}" placeholder="{{ 'customer.register.first_name' | t }}">
<label class="field__label" for="ContactForm-first_name">{{ 'customer.register.first_name' | t }}</label>
</div>
<div class="field">
<input class="field__input" autocomplete="name" type="text" id="ContactForm-last_name" name="contact[{{ 'customer.register.last_name' | t }}]" value="{% if form.first_name %}{{ form.last_name }}{% elsif customer %}{{ customer.last_name }}{% endif %}" placeholder="{{ 'customer.register.last_name' | t }}">
<label class="field__label" for="ContactForm-last_name">{{ 'customer.register.last_name' | t }}</label>
</div>
Hope it helps!
Please mark as a solution if you find my answer helpful for you.
Thanks for your feedback on this, That looks like it works but actually I had the inputs right and had a faulty output on the Dawn 2.0 theme that was giving me the wrong error... ending up being a caputa issue with a bad display.
Cheers,
Chris
Hello! Where does this get posted in code and what line? I would like to add First name to my newsletter form on the Dawn theme. Thank you!
Hi @britt-blyth,
Please go to sections/contact-form.liquid file, you can find it here.
Hope it helps!
Hi, May I know which line to place the 2 fields of code in sections/contact-form.liquid file? Thank you
Problem Solved
hi @carven did you find where to put this code? I am looking to add first name only to my newsletter sign up
Hi - This is what happens when I add this code to the bottom of that section. I added it after endschema (line 218 for me). How do I get these fields to be in line with the email field?
Do you know where about this code is pasted in the file? I can't seem to figure it out.
Hi @FOP,
You can create a question on the community and send me the link. I will check it.
Because this will help build a better community.
Thank you.
I am sorry, I'm still not getting an answer from this thread. Please can someone actually explain what code to add into the email sign up form and where? Many of us would clearly like to capture email + first name, instead of just email. We are happy with the email sign up form as it is, but just need it to have two rows (two fields): one for first name and one for email. Please can someone help?
Thank you.
Josh
I've found a solution that worked for me: https://www.youtube.com/watch?v=Ftx5krQYCQo
(also reproduced at: https://websensepro.com/blog/learn-how-to-add-new-field-in-shopify-newsletter-form/).
You can now see that my store Vandal Gallery has the name fields as well as email fields. Yay!
Thank you so much for posting this. This also worked perfectly for me!!! Great resource.
Hi there, I also want to add a first name field to my email signup form in Studio in Shopify 2.0. I don't know coding, and when I try pasting the code above in the custom CSS field for the sign up section in the theme customiser, it doesn't work. I'm reluctant to add it to the theme code via the 3 dots because there's a warning that I won't be able to update the theme. Can you help please? Thanks!
Jules
This worked for me as far as creating the boxes for the first name and last name fields, but I can't get the placeholder labels to show up. Can you help?
This looks good, and the fields came up nicely, trouble is I did a test filling out my names and only the email came up in the customer listings, no first or last name included, so not sure what to do about that! Any ideas? Many thanks!
Sorry Chris, but how do I add the code to the subscription form?
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025