Custom newsletter signup form

Solved
New Member
2 1 0

Hi there

 

Does adding:

 

<input type="hidden" name="customer[tags]" value="newsletter">

to the "customer" form, magically make those customers appear in the "Accepts Marketing" section of the admin, or do I need to add accepts_marketing as a hidden field with value true?

 

In the examples of newsletter forms I've seen, including the official starter theme, there is just a tag of newsletter. The theme I'm working on doesn't use sections, if that makes any difference.

 

TIA

Jamie

0 Likes
Highlighted
Excursionist
25 2 4

I think this is the info you're looking for:
https://help.shopify.com/en/themes/customization/forms/get-consent-for-promotional-emails

See step #5 specifically.

 

Hope that helps

0 Likes

Success.

New Member
2 1 0

For anyone else stumbling on this post, it seems that "Accepts marketing" is set by default just by using this form type:

 

{% form 'customer' %}

It would be useful if this was documented along with the fact that you need to use "contact[]" and not "customer[]" field names with this form. The documentation could be improved further by explaining what happens when the customer is already added. For that it seems, the behaviour is to just reload the page with the parameters in the URL and supply no form errors.

0 Likes