Creating a new custom field
To add a custom field to a content item, perform the following:
- Open the page of that content type.
For example, open the Images page or the Events page.
- In the right side of the page, click Custom Fields for <content type> link.
The (Content type) data fields page appears. The system displays a list of all custom and default fields for that content type.
For example, on News page, click Custom fields for news link and the News data fields page appears.
NOTE: You can add and delete custom fields, but you cannot add or delete default fields.
- To add a custom field, in Custom fields section, click Add a field… button.
A window opens.
- 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 Creating custom classifications.
- 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.
- 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.
- In Interface widget for entering data dropdown box, you select the widget which the creator or editor of the news 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:
| 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 Using the text editor.
|
| 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. |
- 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.
|
NOTE: You can also select a custom template for displaying the field….
- 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.
- Click Continue.
A window appears where you must configure the appearance of the custom field, such as labels and instructions.
- 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.
- 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.
- 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.
- 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.
- Click Done.
The new field appears in Custom fields section.
If you want to delete a custom field, click
.
- Click Save changes.
To go back to the page with the content items, click Go back.