Search

Index

Revindex Storefront

Custom fields

Last updated on 2021-02-16 2 mins. to read

Custom fields allow you to capture additional information from customers. For example, you may want to require the customer to enter a date for a room reservation or the names of the attendees. The fields could be in the form of textboxes, dropdown list, radio buttons, etc. You can define any number of fields, assign a default value to them, marking them as required and perform simple validations.

You must first enable the Custom fields feature under Configuration > Product. Once enabled, you will see the Custom field tab appear in your product catalog. Click Add new and select "Basic" type. Basic type allows you to create fields from predefined input controls easily without any programming knowledge.

When creating a custom field, make sure you enter a valid ID name for your controls. The ID is used to reference the control by the programming logic. It must be alphanumeric without any spaces and should be unique across all your custom fields and avoid colliding with any existing controls on the page. A good recommendation is to prefix your ID with a word. For example, you can prefix with the word "Custom" or "My" so you end up with an ID of "CustomNameTextBox". The ID name of the field along with its captured value will be printed on the checkout and confirmation pages. Any underscore character will be replaced with a space and control names like "TextBox", "DropDownList" will be omitted from the Web print out. For example, if you named your ID "Custom_NameTextBox", it will print out as "Custom Name" on the Web page.

Comments


Powered by Revindex Wiki