18.11.2015 Views

Beginning Drupal 8

Todd Tomlinson - Beginning Drupal 8 (The Expert's Voice in Drupal) - 2015

Todd Tomlinson - Beginning Drupal 8 (The Expert's Voice in Drupal) - 2015

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 5 ■ Content Types<br />

Figure 5-24. Completing the settings for the check box field<br />

After completing the field settings for the Assistance field, you must then instruct <strong>Drupal</strong> to render<br />

this field as “Check boxes/radio buttons.” Click the “Manage form display” tab at the top of the content edit<br />

form and change the widget type value from “Select list” to “Check boxes/radio buttons,” and click the Save<br />

button. To see the result of adding this field, click one of the “Add content” links and add a new event. The<br />

new check box field will appear as shown in Figure 5-25.<br />

Figure 5-25. The list of check boxes for the Event content type’s Assistance field<br />

Select Lists<br />

Select lists are often called drop-down lists. To demonstrate select lists, let’s create a new field for the Event<br />

content type that lists whether the event is a concert, a play, or a lecture. Creating a select list is similar to<br />

creating the previous field types covered. On the “Manage fields” page for the Event content type, click the<br />

“Add field” button. Select “List (text)” for the field type (refer to Figure 5-17) and enter “Type of Event” in the<br />

Label field. After setting these values, click the “Save and continue” button to proceed with the definition of<br />

your new select list field.<br />

65

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!