Custom Fields
Custom fields are one of the core factors in Hero's versatility. They allow you to extend the data collected and published with Hero in many areas of the application without any programming knowledge or web development experience. (And, developers, they allow you to easily build forms with the Form Builder library.)
Essentially, custom fields are HTML form elements such as dropdowns, textboxes, or file uploads that are added to forms and datasets. By default, the following custom fieldtypes exist:
- Text - Basic text input field (e.g., )
- Textarea - Text input box that allows for multi-line, multi-paragraph input.
- WYSIWYG - Identical to the Textarea field, except that the text box has a What-You-See-Is-What-You-Get HTML editor which makes it easy for non-technical folk to create and edit valid HTML.
- Select Dropdown - List of options that can be selected from a dropdown menu (e.g., ).
- Multiselect Dropdown - Select multiple options from a list of options.
- Checkbox - On/off checkbox. (e.g., Checkbox)
- Multicheckbox - Check none, one, or more options from a list of checkboxes (e.g., One Two Three).
- Radio - Select from a variety of options with radio buttons beside them (e.g., One Two).
- Date - Select a date (will appear as a fancy date selector in the control panel, and three input boxes in the frontend) (e.g., ).
- Date & Time - Select a date (like above) and a time (e.g., ).
- File Upload - Upload a file (e.g., )
- Content Relationship - Link the entry to a content item in your database. For example, members could link their accounts to a list of "Schools" in your database, or you could link content of one type (e.g., "Sports Teams") to an item of another content type (e.g., "Leagues").
Each field can be validated upon submission based on configurations you specify when adding/editing the custom field. For example, you could verify that the text input is alphanumeric, or a valid email address, and you could verify that the file uploaded is in PDF format. There are numerous validation options for each fieldtype.
You can also define default values, help text, and more settings with each custom field.
This guide will introduce you to custom fields and how they apply to the different modules of Hero.
Member Custom Fields
These custom fields are modified at Configuration > Custom Fields > Member Data.
Member custom fields are fields that are part of a member's profile at your website. The following options are available for each field:
- Show in Registration Form - Not all fields need to be required just to setup a member account. Uncheck the box to hide the field during registration, but make it available for editing in the user's profile and in the control panel.
- Billing Address Equivalent - If you are requiring data like "Address", "City", "State" for member profiles, you can save your members time by specifying that these fields correspond with fields in a standard billing address. This way, during checkout, they won't have to re-enter their address details.
- Admin Only - Don't ever display this field to the user, just associate it with their account in the control panel and database - useful for attaching private notes to account(s) or storing system information.
Product Custom Fields
These custom fields are modified at Configuration > Custom Fields > Product Data.
Product custom fields are attached to the products you create in the control panel.
For example, if you like to organize your health food products by the astrological signs that would most benefit by them, you could create a select dropdown field with each astrological sign as an option. Then, when adding/editing products, you can specify the astrological sign linked with each product. This data can then be displayed to your visitors on the product page or in a store collection listing. See how to include this data in your store pages.
Store Collection Custom Fields
These custom fields are modified at Configuration > Custom Fields > Store Collection Data.
Just like product custom fields, you can specify custom fields linked with store collections (i.e., categories) that can then be displayed in the frontend.
Form Custom Fields
Hero includes an easy-to-use form builder in the control panel at Publish > Forms. Each form is comprised of a series of custom fields built with the fieldtypes listed in this guide (and any custom fieldtypes added by developers). Learn more about how forms are built in the control panel.
Content Custom Fields
Content types are also largely comprised of a series of custom fields defined with these fieldtypes. This gives you complete power over the content you are managing and publishing with Hero. Learn more about defining content types and publishing content.