I am trying to add a field to my newsletter signup form that adds a customer note to the customer’s profile.
I have been able to add first and last name successfully, but I can’t find any of the labels and IDs necessary to write the data from the field to the customer notes section.
For example, this is the code for the “last name” field.
<div class="field">
<input class="field__input" autocomplete="name" type="text" id="ContactForm-last_name" name="contact[last_name]" value="" aria-required="true" placeholder="Last Name" required>
<label class="field__label" for="ContactForm-last_name">{{ 'customer.register.last_name' | t }}</label>
</div>
How would I change this code to make it write the data to a customer note? There is a help article about changing the customer registration form, but I would like to have this field on the newsletter form and the information in that help article doesn’t work with the newsletter form for some reason.