Create custom fields

To add a custom field to a content item, perform the following:

  1. Open the module where you want to add a custom field.
    To add a custom field for pages, in the main menu, click Pages.
    To add a custom field for static content items, in the main menu, click Content, then one of the content items under Types of Content.
    For example, Images or Events.
    To add a custom field for dynamic content items, in the main menu, click Administration » Module Builder, then click the name of the dynamic module to which you want to add a custom field.
  2. For static content items, click Settings icon (Settings for <content type>) and on the right side of the screen, click Custom Fields for <content type>.
    The Custom fields page appears. The system displays a list of all custom and default fields for that content type or page.

    NOTE: You can add and delete custom fields, but you cannot add or delete default fields.

  3. To add a custom field, click the Add a field… button.
    For static content items, this button is in the Custom fields section, and for dynamic content items, it is in the Fields of this item section.
    The Add a field window opens.
  4. In the Type dropdown box, select what type of input will be entered in this custom field.
    Different types of input require the use of different widgets for entering data.
    • If you choose Number type of field, the Decimal places dropdown box appears.
      Select the number of decimal places after the decimal point that can be entered in this field.
    • If you choose Classification type of field, the Classification dropdown box appears.
      Select the type of classification you want to create.
      The dropdown box contains the predefined types of classifications – Categories and Tags, and any other custom classifications you have created. For more information, see Create custom classifications.
    • If you choose Related data, proceed to Related data custom field.
    • If you choose Related media, proceed to Related media custom field.
  5. Enter a name for the field.
    The name of the field is different from its label. The field's name serves as a reference for that field in the backend.
    NOTE: For some field types, such as Classification, the Name field is automatically generated and cannot be changed.
  6. If you select This is a hidden field checkbox, the custom field is not visible on the website or in the backend, and you can only use it in the code.
    For static content types, you can later unhide the field, by clicking it in section Custom fields and changing the selection on the Appearance tab.
    Dynamic content types do not support editing their hidden fields.
  7. In the Interface widget for entering data dropdown box, you select the widget which the creator or editor of the content item or page will use to complete the field.

    Each type of field you select in the Type dropdown box has a default widget for entering data. The following table contains the list of all types of fields together with a description of what is displayed when creating and editing the content item for which the field is created:

    Type of field Appearance of the custom field
    Short text An input field with labels and instructions, which you add in Step 9.
    Long text

    The text editor. For more information, see Text editor .

    NOTE: Suppose you are adding the long text field to a dynamic content type that you want to use for entering some system content, such as JavaScript code or Kendo UI templates. In such case, you can disable the parsing of any links, including image links. If the link is a link to an image, the system displays the full path to the image, which means that the link will be broken, if you change the host.
    To do this, select More options » Disable Link Parser.

    Multiple choice Radio buttons with labels, which you add in Step 9.
    Yes / No A checkbox, which you select for Yes and deselect for No.
    Currency An input field with labels and instructions, which you add in Step 9.
    Date and Time An input field with labels and instructions, which you add in Step 9.
    Number An input field with labels and instructions, which you add in Step 9.
    Classification
    • If in the Interface widget for entering data dropdown box, you have selected Textbox selector, the system displays an input field where you type new classifications or a link where you select from the existing classifications.
      For more information, see Add categories and tags to a content item » Adding tags.
    • If in the Interface widget for entering data dropdown box, you have selected Tree-like selector, the system displays a tree structure of existing classifications, from which you can select.
      For more information, see Add categories and tags to a content item » Adding categories.
    Related data

    A content items selector, which you use to associate the content item you are creating with another content item of a different type.

    For more information, see Related data custom field.

    Related media

    A content items selector, which you use to associate the content item you are creating with a media type.

    This field gives you the option to add images, videos, and documents to a content item or page using a selector widget.

    For more information, see Related media custom field.

    Address

    NOTE: This field is available only for dynamic modules. For more information see Address custom field.

    Search engine optimization This field is not shown in the frontend, and you do not need to set up its appearance.
    Social media (OpenGraph) This field is not shown in the frontend, and you do not need to set up its appearance.
    GUID

    NOTE: You usually use GUIDs only programmatically and do not expose them to content creators or site visitors. For more information, see GUID custom field.

    Array of GUIDs

    NOTE: You usually use GUIDs only programmatically and do not expose them to content creators or site visitors. For more information, see Array of GUIDs.

  8. Expand the Advanced section if you want to change the database and the SQL database type of the custom field, if you want to specify the name of the column of the database table where the custom field is added, and if you want to make additional advanced settings.

    Check the Allow empty values checkbox when the field is not required and site users can leave it empty. If you deselect this checkbox, the field becomes mandatory.

  9. Click Continue.
    A window appears where you must configure the appearance of the custom field, such as labels and instructions.
  10. Perform one of the following:
    • If in the Type input field, you have selected Short text, Long text, Yes / No, Currency, Date and Time, Number, or Classification, perform the configuration procedure for Textbox » Label and texts and Limitations tabs.
    • If in Type input field, you have selected Multiple choice, perform the configuration procedure for Checkboxes » Label and texts tabs.
  11. Click the Appearance tab and select where you want to display the custom field you have created.
    The Appearance tab is not available in dynamic content types.
    • If you do not want to display the custom field on all screens where you work with the content item, you can select the checkboxes of only those screens where you want the field to be displayed. To do this, select Some screens where you work with <content type> in the Backend… and select the screens where you want the custom field to appear.

      NOTE: When you are adding a custom field to Images, Videos, or Document, this field is displayed on the upload screen, when you upload items via the Image widget, Video widget, or Document link widget widgets. If you do not want to display the custom fields, deselect the upload screens.

    • If in Step 6 you have made the field a hidden field, radio button Nowhere. This is a hidden field is selected on Appearance tab when you open the field for editing. If you change the selection, the field is no longer hidden.
    • If the field is not hidden, you can hide it by selecting Nowhere. This is a hidden field radio button.
  12. On the Appearance tab, in the CSS class input field, you can choose a class name for the custom field if later you want to set a CSS style for this field.
  13. Click Done.
    The new field appears in Custom fields section.

    If you want to delete a custom field, click .

  14. Click Save changes.
    To go back to the page with the content items, click Go back.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?