Custom fields


Use this procedure to add a custom field to a content item or page. A custom field is a field that you create. There are default fields for each content item or page , such as author, title, etc. If you need to add fields other than the existing ones, you must create a custom field, for example, price. A custom field is associated with the content type or page. The field appears in the backend when somebody is creating that content type. The custom field can then be filled out by the creator and then displayed on the public part by adding it to the widget template, which is used to display that content type.

EXAMPLE: When creating an event, you can enter its location, starting and ending time, and other predefined parameters. For each event, you can add a custom field, for example, Dress code. Afterward, each time an event is created, the creator can fill out this Dress code field. You can make this field to be a multiple choice.  To control where or whether to display this field on the website together with each event, you modify the template used to display events.

Display information entered in a custom field

After you have created a custom field, everybody who is creating or editing the content items for which you have added a custom field can enter information in that field.If there are any created custom fields for the content type you are creating, a Custom fields section appears at the end of the page, and the created fields appear in this section.

To display a custom field on the public side of your website, you must add the field to the widget template which you use to display that content type. For more information, see Create and edit widget templates.

For more information about including a custom field in search indexes, see Create search indexes.

For more information about working with custom fields programmatically, see Custom fields of modules.

Want to learn more?

Sign up for our free beginner training. Boost your credentials through advanced courses and certification.
Register for Sitefinity training and certification.

Was this article helpful?

Next article