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.
    If you want to add a custom field for pages, in the main menu, click Pages.
    For example, open the Images page or the Events page, or click Pages.
  2. In the right side of the screen, click Custom Fields link.
    The <Content type> data fields page appears. The system displays a list of all custom and default fields for that content type or page.

    For example, on News page, click Custom fields for news link and the News data fields page appears. On Pages page, click Custom fields.

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

  3. To add a custom field, in Custom fields section, click Add a field… button.
    A window opens.
  4. In 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 Add a Related data custom field.
    • If you choose Related media, proceed to Add a Related media custom field.
  5. Enter a name for the field.
    The name of the field is different from its label. The name of the field serves as reference for that field in the backend.
  6. If you select This is a hidden field checkbox, the custom field is not visible on the website or in the backend, you can only use it in the code.
    You can later unhide the field, by clicking it in section Custom fields and changing the selection on Appearance tab.
  7. In 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 Type dropdown box has a default widget(s) 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: If you are adding the long text field to a dynamic content type, created with the Module Builder, that you want to use for entering some system content, such as java scripts or kendo UI templates, 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.
    You do this by selecting 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 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 Adding categories and tags to a content item » Adding tags.
    • If in 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 Adding categories and tags to a content item » Adding categories.
    Related data

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

    For more information, see Add a Related data custom field

    Related media

    A content items selector, which you use to associate the content item that 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 Add a Related media custom field

    Address  NOTE: This field is available only for dynamic modules. For more information see Address custom field
  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.

    If the Allow empty values checkbox is selected, it means that the field is not required and can be left empty. If you deselect it, 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 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 Appearance tab and select where you want to display the custom field you have created.
    • 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 Appearance tab, in 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 particular 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?