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-11. Setting the date type and number of allowed values<br />

The next form that <strong>Drupal</strong> displays (shown in Figure 5-12) enables you to set additional detailed<br />

parameters for the event Start Date field. On this form you have the ability to<br />

• Change the label that we previously defined for this field. Unless you made a mistake<br />

or changed your mind, you can leave the value as it is shown.<br />

• Enter content in the “Help text” field to be displayed beneath the text field on the<br />

screen. This is a great place to describe requirements for data that will be entered<br />

in this field, such as requesting that authors enter dates as mm/dd/yyyy. This is an<br />

optional field.<br />

• Define whether this field is required. A required field is displayed with a red asterisk,<br />

and <strong>Drupal</strong> forces the user to enter a value in this field before the content item<br />

can be saved. Because our content type is about an Event and dates are important<br />

attributes of an Event, you want a date to be required, so check the “Required field”<br />

check box.<br />

• Define whether a default value is assigned to the field before the content creation<br />

screen is displayed to the author. Because our field deals with dates in the future,<br />

providing a default value doesn’t make sense. There may be cases for other fields<br />

where a default value does make sense, such as selecting a seating preference for the<br />

event: you may wish to set a default value to “best available.” In those cases, this is<br />

the place where you would enter the default value.<br />

55

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

Saved successfully!

Ooh no, something went wrong!