Add First Name Field on Password Page - Blockshop

Highlighted
Excursionist
16 1 4

Hello!

 

Hoping someone would be kind enough to help point me in the right direction because I am STUCK.

I would like to add a first name field to the password page of the Blockshop theme. I'm pretty sure the code would need to be added to the framework--password.liquid file, I'm just having a bit of trouble figuring out the correct code to be used.

Would be super appreciative if someone could help me get this sorted. I know it's not an official Shopify theme, but I'm hoping someone from this awesome community can help lend a hand with this. 

My site is https://shop-sunday-love-luxury-bath-co.myshopify.com/ and the password is: jaKhq!@3  in case you need to look at the site.

Thanks in advance

0 Likes
Highlighted
Shopify Expert
65 2 5

@OHN87  we can't look into the theme code file you are using a premium theme, I can not look at code anywhere can please share a code snippet here. you give me access for that

Highlighted
Excursionist
16 1 4

Hi! @AvidBrio Thanks so much for your reply!

 

Here is the section I think it might belong to:

 

 

		<div class="password--mailing-list" id="newsletter">

				{% form 'customer', id: 'password_form' %}
					{% if form.posted_successfully? %}
						<p class="success" data-item="paragraph">
							{{ success_message_t }}
						</p>
					{% endif %}

					{% if form.errors %}
						<p class="error" data-item="paragraph">
							{% for field in form.errors %}
								{{ field }} {{ form.errors.messages[field] }}
							{% endfor %}
						</p>
					{% endif %}

					<input type="hidden" name="contact[tags]" value="{{ source }}" />
					<input type="hidden" name="contact[first_name]" value="Newsletter" />
					<input type="hidden" name="contact[last_name]" value="Subscriber" />
					<label for="password-email" data-item="hidden-text">
						{{ mailing_placeholder_t }}
					</label>

					<input
						aria-label="{{ mailing_placeholder_t }}"
						type="email"
						id="password-email"
						placeholder="{{ mailing_placeholder_t }}"
						name="contact[email]"
						required
					/>

 

0 Likes
Highlighted
Shopify Expert
65 2 5

@OHN87 

<input type="hidden" name="contact[first_name]" value="Newsletter" />

you replace type hidden to text

 

	<input type="text" name="contact[first_name]" value="Newsletter" />

 



Highlighted
Excursionist
16 1 4

Hi! @AvidBrio 

Thanks so much for this! So it works, but there are also two issues with it:

 

1. The field looks like this, is it possible to change it from a box to just a line where the name can be typed:

Screen Shot 2020-11-03 at 1.00.51 PM.png

 

2. When I add a subscriber It enters their name as "First Name Subscriber", is there a way to change this so it only captures their name.

 

I really appreciate your help with this!

0 Likes
Highlighted
Shopify Expert
65 2 5

@OHN87  yes, you have to copy email input box CSS and apply to name input fields both input style same then its look same.

0 Likes