You are here: Administrators Reference > Site Administration > Elements & Forms > Field Types and Masks


Field Types and Masks

Out-of-the-box CommonSpot provides more than a dozen field types used to create custom Elements, simple forms, and metadata forms. CommonSpot field types include commonly used components such as popup calendars, text areas, selection lists, checkboxes, radio buttons, large text blocks, images, formatted text blocks, etc. This release includes a multimedia field type.

Developers or site administrators can create and register custom field types used on metadata forms, simple forms, or Custom Elements. In addition, developers can define one or more Field Masks - small ColdFusion scripts, similar to Custom Render Handlers, for controlling field display on output.

To access this option, click to expand Elements & Forms in the left panel of the Site Administration Dashboard and click Field Types and Masks.

Use the Field Types and Masks dialog to register and manage both Fields Masks and Custom Field Types. You can modify settings for a defined mask, add a new one, or create and manage custom field types. Use the Field Types dropdown to filter for Standard or Custom Field Types. The Standard Field Types view displays all field types allowed by default in a Display Template. The Custom Field Types view is populated when you add new Custom Field Types.

Once one or more Field Masks are registered for a Field Type, the Description column displays the new Field Masks, as shown above for the calendar and cs_url field types. Selecting the Mask(s) link displays the Field Masks dialog.

Creating a new Field Mask or editing an existing one is a simple matter of giving it a name and other basic information, and then selecting the code files for the Input and Output modules respectively.

To add a new Custom Field Type click Add New Field Type, at the bottom of the dialog to display the Add Field Type dialog. To add a new Field Mask, click the Add Mask icon associated with the Field Type to invoke the Add Field Mask dialog.

To edit an Existing Custom Field Type, click the associated edit icon .

To delete an Existing Custom Field Type, click the delete icon for the selected Custom Field Type.

The Data Type column displays settings for how HTML data is handled during editing and output.These settings are defined in the the Data Type field as part of the Add Field Type process.

Once code is developed and registered, it is available for selection during Element Display Template creation. When designers select a field for insertion into a Display Template (shown below), a menu of available Render Masks for that field displays. Once selected, Field Render Mask code is invoked every time the Custom Element using that Display Template displays.

In many cases, the value of the field may represent a key to a record in a remote database, or the stored value is not exactly what should display to end users. For example, the stored value may be an employee ID value, but you want to display the employee's full name.


Related Links

Custom Field Type State

You can download PDF versions of the Content Contributor's, Administrator's, and Elements Reference documents from the support section of (requires login).

For technical support: