Search

Contents

Revindex Storefront

Export Print

Custom fields

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 either "Basic" or "Custom code". Basic type allows you to create fields from predefined input controls easily without any programming knowledge. If you want complete control over the rendered HTML, you can select the "Custom code" dynamic form type. Under custom code, you can enter HTML, ASP.NET tags and even Javascript.

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 ASP.NET 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.

You'll find many references for the controls on the Web. Here's a good easy to read reference:

Comments

Add comment

Powered by Revindex Wiki