December 2016
Beginner to intermediate
1005 pages
21h 54m
English
With the release of Drupal 8, Drupal has finally entered into the realm of HTML5. The Form API now allows utilization of HTML5 input elements out of the box. These include the following element types:
telemailnumberdateurlsearchrangeThis allows your forms in Drupal to leverage native device input methods along with native validation support.
This recipe will walk you through adding elements to a Drupal form. You will need to have a custom form implemented through a module, such as the one created in the Creating a form section.
form element definition of the tel type to your buildForm method:$form['phone'] = array( '#type' => 'tel', '#title' ...
Read now
Unlock full access