I'm trying to create a custom form but the metafields are showing empty.

I'm trying to create a custom form but the metafields are showing empty.

yehyanb11
Tourist
3 0 1

hello, i'm creating an extra fields for my customer register form and its not working, i'm wondering if there's any solution for that, however i created the metafields needed for that, i want the infos to show in metafield at customer section on shopify but its showing in notes i tried to show them in meta field by changing [] to meta field but still not working

 

 

 

 

<div class="page-width page-width--tiny page-content">
  <header class="section-header">
    <h1 class="section-header__title">{{ 'customer.register.title' | t }}</h1>
  </header>

  <div class="form-vertical">
    {%- form 'create_customer' -%}

      {{ form.errors | default_errors }}

      <!-- Basic Customer Fields -->
      <label for="FirstName">{{ 'customer.register.first_name' | t }}</label>
      <input type="text" name="customer[first_name]" id="FirstName" class="input-full" {% if form.first_name %} value="{{ form.first_name }}"{% endif %} autocapitalize="words" autofocus>

      <label for="LastName">{{ 'customer.register.last_name' | t }}</label>
      <input type="text" name="customer[last_name]" id="LastName" class="input-full" {% if form.last_name %} value="{{ form.last_name }}"{% endif %} autocapitalize="words">

      <label for="Email">{{ 'customer.register.email' | t }}</label>
      <input type="email" name="customer[email]" id="Email" class="input-full{% if form.errors contains 'email' %} error{% endif %}" {% if form.email %} value="{{ form.email }}"{% endif %} autocorrect="off" autocapitalize="off">

      <label for="CreatePassword">{{ 'customer.register.password' | t }}</label>
      <input type="password" name="customer[password]" id="CreatePassword" class="input-full{% if form.errors contains 'password' %} error{% endif %}">

      <!-- Metafield Inputs -->
      <!-- Address Field -->
<label for="Address">Address</label>
<input 
    type="text" 
    name="customer[note][address]" 
    id="Address" 
    aria-required="true">

<!-- City Field -->
<label for="City">City</label>
<input 
    type="text" 
    name="customer[note][city]" 
    id="City" 
    aria-required="true">

<!-- State Field -->
<label for="State">State</label>
<input 
    type="text" 
    name="customer[note][state]" 
    id="State" 
    aria-required="true">

<!-- ZIP Field -->
<label for="Zip">ZIP</label>
<input 
    type="text" 
    name="customer[note][zip]" 
    id="Zip" 
    aria-required="true">

<!-- Instagram Handle Field -->
<label for="InstagramHandle">Instagram Handle</label>
<input 
    type="text" 
    name="customer[note][instagram_handle]" 
    id="InstagramHandle" 
    aria-required="true">

<!-- Referral's Phone Field -->
<label for="ReferralsPhone">Referral's Phone</label>
<input 
    type="text" 
    name="customer[note][referrals_phone]" 
    id="ReferralsPhone" 
    aria-required="true">

<!-- Upload ID Field -->
<label for="UploadID">Upload ID</label>
<input 
    type="file" 
    name="customer[note][upload_id]" 
    id="UploadID" 
    aria-required="true">

<!-- Upload Selfie ID Field -->
<label for="UploadSelfieID">Upload Selfie ID</label>
<input 
    type="file" 
    name="customer[note][upload_selfie]" 
    id="UploadSelfieID" 
    aria-required="true">

<!-- Submit Button -->
<p>
    <label for="register-submit" class="hidden-label">{{ 'customer.register.submit' | t }}</label>
    <input 
        type="submit" 
        id="register-submit" 
        value="{{ 'customer.register.submit' | t }}">
</p>



    {%- endform -%}
  </div>
</div>

 

 

 

 

 

 

Replies 4 (4)
yehyanb11
Tourist
3 0 1

i sent you an email please check

 

yehyanb11
Tourist
3 0 1

its yehyanb96@

 

Benjamen
Shopify Partner
137 8 16

Looks like you're well on your way 💪🏼
IF you decide to go the app route Customer Fields supports metafield custom namespaces, and was designed for your use case. Again, it looks like you'll be able to build a custom solution, but I thought I'd give you another option 😊

Benjamen @ Helium
- Customer Fields ✪✪✪✪✪ (357+ reviews)
- Meteor Mega Menu ✪✪✪✪✪ (299+ reviews)
- Strike Automatic Discounts NEW!

Benjamen
Shopify Partner
137 8 16
 
 
I was asking our team about this and was informed, that unfortunately it’s not currently possible to save values to metafields directly through a form like this. To access Shopify’s metafields, you will need to use their API which means either building a custom app, or a public app like Helium Customer Fields. The Customer Fields app is specifically designed to help with this use case, and has a no code form builder and installation method to easily add custom fields to your registration and save the values directly into customer metafields.
I hope this clarification steers you in the right direction.
 
Benjamen @ Helium
- Customer Fields ✪✪✪✪✪ (357+ reviews)
- Meteor Mega Menu ✪✪✪✪✪ (299+ reviews)
- Strike Automatic Discounts NEW!