Knowledgebase

How to edit and create content type fields in Drupal

In Drupal you can edit the fields for any of the content types; you can add new fields, and you can change the order of the fields both on the submission form in the admin panel and on the frontend.

When you edit a content type there are a few sub-tabs with settings: Edit, Manage Fields, Manage Display, Comment Fields, Comment Display. Click on the Manage Fields sub-tab to edit the settings of existing fields, to add new fields, or to change the positions in which the fields are displayed on the create/edit form for nodes from that content type. Newly created content types are configured by default with two fields: one for a title and the other for a body of text (Long text and summary field type). To edit the settings of a field click on its edit button in the table on the Manage Fields page.

If you want to add a new field, type its label in the text area that's provided in the table, then select a field type (e.g. decimal, image, file, etc.) from the corresponding drop-down menu. After you select the type you can choose the widget that will be used for inputting information in that field. For some field types you can choose only one widget, while for others you have a choice from a few widgets. After you do these things click on the Save button and you'll be automatically taken to the page on which you can configure the field settings.

On the Manage Fields sub-tab page you can also change the positions of the fields. To do this hover the mouse pointer over the four-arrow button in front of the field's name, press and hold the left mouse button, drag the field to the desired position, and click on the Save button. This will change the order of the fields only on the submission form in the admin panel.

Click on the Manage Display sub-tab and use the same method, if you want to change the order of the fields on the frontend. By default, nodes are displayed on the frontend in a teaser view and in a full/default view. In the top right corner of the Manage Display page there are two buttons (Default and Teaser) which you can use to edit the fields in both views. On the Manage Display sub-tab page for each field there's a Label drop-down menu from which you can choose whether the label should be shown on the frontend, or whether it should be hidden. You can use the Format drop-down menu to change how the data is displayed. After you're done with the changes don't forget to click on the Save button.

The last two sub-tabs are Comment Fields and Comment Display. You can use them to manage the fields for the comments for the nodes of the particular content type. The settings are configured in the same way as those on the Manage Fields and Manage Display pages.

For more details and screenshots check out the Drupal fields tutorial.

Was this answer helpful?

 Print this Article

Also Read