Re: How to add first name field to newsletter signup Dawn theme?

Solved

How to add first name field to newsletter signup Dawn theme?

SunnyDaze
Excursionist
16 1 6

I have a newsletter sign-up in the footer of all my pages and on one sign-up page that I link to. It currently just asks for email address, but I want to add a field for first name as well. I believe I'll need to edit the page.newsletter-template.json file, yes?  I am including a screenshot of that below. I'm hoping someone could tell me exactly what to type and where in order to add a mandatory first name field to it. THANK YOU!!!

SunnyDaze_0-1747699905719.png

 

Accepted Solution (1)
SunnyDaze
Excursionist
16 1 6

This is an accepted solution.

Thank you! This worked perfectly to add the first name field on the newsletter sign-up page.

View solution in original post

Replies 4 (4)

Guleria
Shopify Partner
4181 812 1168

Hello @SunnyDaze ,

 

To add first name inout in footer newsletter you need to edit sections -> footer.liquid 

search for this code
<div class="field">

once find it  just before to it use this code

 

<div class="field">
                <input name='first-name' type='text' class="field__input" placeholder="First name" required>
                    <label class="field__label" for="NewsletterForm--{{ section.id }}">
                      First name
                    </label>
                  </div>

 

Regards
Guleria



- Custom themes, UI/UX design, ongoing maintenance & support.
- Drop an email   if you are looking for quick fix or any customization
- Email: guleriathakur43@gmail.com Skype: live:navrocks1
- Try GEMPAGES a great page builder
SunnyDaze
Excursionist
16 1 6

Thank you! This worked perfectly to add the first name field in the footer.

MR115_ShopiDevs
Shopify Partner
21 4 3

Paste this code into the form inside your newsletter.liquid file, replacing the existing form or adjusting as needed

<form method="post" action="{{ routes.newsletter_subscribe_url }}" accept-charset="UTF-8" class="newsletter-form">
  <input type="hidden" name="form_type" value="customer">
  <input type="hidden" name="utf8" value="✓">

  <div class="field">
    <input
      id="NewsletterForm--first-name"
      type="text"
      name="contact[first_name]"
      class="field__input"
      placeholder="First name"
      required
    >
    <label class="field__label" for="NewsletterForm--first-name">First name</label>
  </div>

  <div class="field">
    <input
      id="NewsletterForm--email"
      type="email"
      name="contact[email]"
      class="field__input"
      placeholder="Email address"
      required
    >
    <label class="field__label" for="NewsletterForm--email">Email address</label>
  </div>

  <button type="submit" class="button">Subscribe</button>
</form>

 Please let us know if you need any further assistance.

EasyDisplay: Product Showcase - Easily display collections, related products, discounts, recently viewed items, and best sellers
Essential Grid Gallery - Create photo galleries, video galleries, portfolio galleries, product gallery, collection gallery and more.
Slider Revolution - Create sliders, theme sections, banners, videos, pages, advanced animation, and social feeds.
SunnyDaze
Excursionist
16 1 6

This is an accepted solution.

Thank you! This worked perfectly to add the first name field on the newsletter sign-up page.