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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 5 ■ Content Types<br />

Figure 5-20. Setting the widget type to “Check boxes/radio buttons”<br />

After clicking the Save button, the new field is ready for use, as shown in Figure 5-21. You’ll note that<br />

<strong>Drupal</strong> added a third option to our list, the N/A option. Since we did not check the “Required field” check<br />

box for this field (see Figure 5-19), <strong>Drupal</strong> automatically inserts the N/A option because a visitor may wish to<br />

not select an option. If you want to remove the N/A option, check the “Required field” check box and <strong>Drupal</strong><br />

will remove that option from the list.<br />

Figure 5-21. The “Type of Seating” radio buttons field<br />

Check Boxes<br />

Check boxes are similar to radio buttons but allow the user to select more than one value from the list.<br />

We will now expand on our Event content type by adding a list of check boxes that addresses special<br />

accommodations available at this event for attendees with disabilities. We will create check boxes that<br />

specify whether audio-assisted devices, visual-assisted devices, and wheelchair seating are available for this<br />

event. To define the list of check boxes, return to the Event content type’s “Manage fields” page and click the<br />

“Add field” button. Select “List (text)” from the “Add a new field” select list (refer to Figure 5-17) and enter a<br />

title of “Assistance” in the Label field (see Figure 5-22).<br />

63

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

Saved successfully!

Ooh no, something went wrong!