Custom user fields

Custom user fields

Enables you to record additional information about the user against their customer card on the checkout.

Coding instructions

The code below is a example of a dropdown that you can add to the checkout. The code is added to the /cart/onepage.template.html file where is the name of the theme folder.

The field name is based on the custom customer field you create in the control panel. To create a new custom field, go to Admin > Customisable Fields > Customer > Customer Fields and select Add New.

Prefix the customer user field field ID with user_ to give you the field name on the Checkout page. So the field ID misc1 will have the field name user_misc1 on the Checkout page.

<div class="form-control">
    <label class="control-label col-xs-12 col-sm-4" for="user_misc1">How did you hear about us?</label>
    <div class="col-xs-12 col-sm-8">
        <div class="form-group">
            <select name="user_misc1" class="form-control">
                <option value="">Select...</option>
                <option value="Google">Google</option>
                <option value="Facebook">Facebook</option>
                <option value="Friend / referral">Friend / referral</option>
                <option value="Returning customer">Returning customer</option>
                <option value="Other blog / website">Other blog / website</option>
            </select>
        </div>
    </div>
</div>

Was this article useful?

Be notified when this page is updated. Optional.