commit 255ec919467fbdafcc1eadff46d6fb4b4afc9e55 Author: Erik Stielstra Date: Sat Mar 29 18:46:56 2014 +0100 #11 tel, url diff --git a/developer/topics/forms_api_reference.html b/developer/topics/forms_api_reference.html index 026da59..eade57b 100644 --- a/developer/topics/forms_api_reference.html +++ b/developer/topics/forms_api_reference.html @@ -86,9 +86,11 @@ For more extensive information about the Form API, see the search select table + tel text_format textarea textfield + url vertical_tabs weight #type @@ -116,10 +118,12 @@ For more extensive information about the Form API, see the X X X + X X X X X + X X X #access @@ -147,9 +151,11 @@ For more extensive information about the Form API, see the X X X + X X X X + X X X #after_build @@ -177,9 +183,11 @@ For more extensive information about the Form API, see the X X X + X X X X + X - - #ajax @@ -208,9 +216,11 @@ For more extensive information about the Form API, see the X X X + X X X X + X X X #array_parents @@ -239,9 +249,11 @@ For more extensive information about the Form API, see the X X X + X X X X + X X X #attached @@ -270,9 +282,11 @@ For more extensive information about the Form API, see the X X X + X X X X + X - X #attributes @@ -300,9 +314,11 @@ For more extensive information about the Form API, see the X - - + - - - X + - - - #autocomplete_path @@ -330,9 +346,11 @@ For more extensive information about the Form API, see the - - - + - - - - + - - - #collapsed @@ -360,9 +378,11 @@ For more extensive information about the Form API, see the - - - + - - - - + - - - #collapsible @@ -390,9 +410,11 @@ For more extensive information about the Form API, see the - - - + - X X - + - - - #cols @@ -420,9 +442,11 @@ For more extensive information about the Form API, see the - - - + - - - - + - - - #date_date_callbacks @@ -450,9 +474,11 @@ For more extensive information about the Form API, see the - - - + - - - - + - - - #date_date_element @@ -480,9 +506,11 @@ For more extensive information about the Form API, see the - - - + - - - - + - - - #date_date_format @@ -510,9 +538,11 @@ For more extensive information about the Form API, see the - - - + - - - - + - - - #date_format_string_type @@ -540,9 +570,11 @@ For more extensive information about the Form API, see the - - - + - - - - + - - - #date_increment @@ -570,9 +602,11 @@ For more extensive information about the Form API, see the - - - + - - - - + - - - #date_part_order @@ -600,9 +634,11 @@ For more extensive information about the Form API, see the - - - + - - - - + - - - #date_time_callbacks @@ -629,10 +665,11 @@ For more extensive information about the Form API, see the - - - + - - - - - - + - - - - #date_time_element @@ -660,9 +697,11 @@ For more extensive information about the Form API, see the - - - + - - - - + - - - #date_time_format @@ -690,9 +729,11 @@ For more extensive information about the Form API, see the - - - + - - - - + - - - #date_timezone @@ -720,9 +761,11 @@ For more extensive information about the Form API, see the - - - + - - - - + - - - #date_year_range @@ -750,9 +793,11 @@ For more extensive information about the Form API, see the - - - + - - - - + - X - #default_tab @@ -780,9 +825,11 @@ For more extensive information about the Form API, see the X X X + X X X X + X - X #default_value @@ -810,9 +857,11 @@ For more extensive information about the Form API, see the - - - + - - - - + - - X #delta @@ -840,9 +889,11 @@ For more extensive information about the Form API, see the X X - + X X X X + X - X #description @@ -870,9 +921,11 @@ For more extensive information about the Form API, see the X X - + X X X X + X - X #disabled @@ -900,9 +953,11 @@ For more extensive information about the Form API, see the X X X + X X X X + X X X #element_validate @@ -930,9 +985,11 @@ For more extensive information about the Form API, see the - - X + - - - - + - - - #empty @@ -960,9 +1017,11 @@ For more extensive information about the Form API, see the - X - + - - - - + - - - #empty_option @@ -990,9 +1049,11 @@ For more extensive information about the Form API, see the - X - - - + - + - - - + - - - #empty_value @@ -1020,9 +1081,11 @@ For more extensive information about the Form API, see the X X - + - - X X + - - - #field_prefix @@ -1050,9 +1113,11 @@ For more extensive information about the Form API, see the X X - + - - X X + - - - #field_suffix @@ -1080,9 +1145,11 @@ For more extensive information about the Form API, see the - - - + - - - - + - - - #group @@ -1110,9 +1177,11 @@ For more extensive information about the Form API, see the - - X + - - - - + - - - #header @@ -1140,9 +1209,11 @@ For more extensive information about the Form API, see the search select table + tel text_format textarea textfield + url vertical_tabs weight #type @@ -1171,9 +1242,11 @@ For more extensive information about the Form API, see the - - X + - - - - + - - - #js_select @@ -1201,9 +1274,11 @@ For more extensive information about the Form API, see the - - - + - - - - + - - - #languages @@ -1231,9 +1306,11 @@ For more extensive information about the Form API, see the - - - + - - - - + - - - #max @@ -1261,9 +1338,11 @@ For more extensive information about the Form API, see the X - - + X - - X + X - - #maxlength @@ -1291,9 +1370,11 @@ For more extensive information about the Form API, see the - - - + - - - - + - - - #min @@ -1321,9 +1402,11 @@ For more extensive information about the Form API, see the - X X + - - - - + - - - #multiple @@ -1351,9 +1434,11 @@ For more extensive information about the Form API, see the - X X + - - - - + - - - #options @@ -1381,9 +1466,11 @@ For more extensive information about the Form API, see the X X X + X X X X + X X X #parents @@ -1411,9 +1498,11 @@ For more extensive information about the Form API, see the X - - + X - X X + X - - #placeholder @@ -1442,9 +1531,11 @@ For more extensive information about the Form API, see the X X X + X X X X + X X X #post_render @@ -1472,9 +1563,11 @@ For more extensive information about the Form API, see the X X X + X X X X + X X X #prefix @@ -1502,9 +1595,11 @@ For more extensive information about the Form API, see the X X X + X X X X + X X X #pre_render @@ -1532,9 +1627,11 @@ For more extensive information about the Form API, see the X X X + X X X X + X X X #process @@ -1562,9 +1659,11 @@ For more extensive information about the Form API, see the X X - + X X X X + X - X #required @@ -1592,9 +1691,11 @@ For more extensive information about the Form API, see the - - - + - X X - + - - - #resizable @@ -1622,9 +1723,11 @@ For more extensive information about the Form API, see the - - X + - - - - + - - - #responsive @@ -1652,9 +1755,11 @@ For more extensive information about the Form API, see the - - - + - - - - + - - - #return_value @@ -1682,9 +1787,11 @@ For more extensive information about the Form API, see the - - - + - X X - + - - - #rows @@ -1712,9 +1819,11 @@ For more extensive information about the Form API, see the X X - + X - - X + X - - #size @@ -1742,9 +1851,11 @@ For more extensive information about the Form API, see the X X X + X X X X + X X X #states @@ -1772,9 +1883,11 @@ For more extensive information about the Form API, see the - - - + - - - - + - - - #step @@ -1802,9 +1915,11 @@ For more extensive information about the Form API, see the - - X + - - - - + - - - #sticky @@ -1832,9 +1947,11 @@ For more extensive information about the Form API, see the X X X + X X X X + X X X #suffix @@ -1862,9 +1979,11 @@ For more extensive information about the Form API, see the - - X + - - - - + - - - #tabledrag @@ -1892,9 +2011,11 @@ For more extensive information about the Form API, see the - - X + - - - - + - - - #tableselect @@ -1922,9 +2043,11 @@ For more extensive information about the Form API, see the X X X + X X X X + X X X #theme @@ -1952,9 +2075,11 @@ For more extensive information about the Form API, see the X X X + X X X X + X X X #theme_wrappers @@ -1982,9 +2107,11 @@ For more extensive information about the Form API, see the X X - + X X X X + X - X #title @@ -2012,9 +2139,11 @@ For more extensive information about the Form API, see the X X - + X X X X + X - X #title_display @@ -2042,9 +2171,11 @@ For more extensive information about the Form API, see the X X X + X X X X + X X X #tree @@ -2072,9 +2203,11 @@ For more extensive information about the Form API, see the X X X + X X X X + X X X #value_callback @@ -2103,9 +2236,11 @@ For more extensive information about the Form API, see the X X X + X X X X + X X X #weight @@ -3708,6 +3843,27 @@ $form['submit'<?php
 
/**
   * Basic table
   */
 
$header = array('first', 'second');
 
$rows = array(
    array(
'primera', 'secundo'),
    array(
'eerste', 'tweede'),
    array(
'1', '2'),
  );
 
$form['table'] = array(
   
'#type' => 'table',
   
'#header' => $header,
   
'#rows' => $rows,
   
'#empty' => $this->t('No info available.'),
  );
 
/**
   * Table with dragable rows.
   *
   * @see \Drupal\Core\Config\Entity\DraggableListBuilder::buildForm()
   */
 
$header = array('Number', 'Character');
 
$rows = array(
   
1 => array(
     
'data' => array('1', 'A'),
     
'class' => array('draggable'),
    ),
   
2 => array(
     
'data' => array('2', 'B'),
     
'class' => array('draggable'),
    ),
   
3 => array(
     
'data' => array('3', 'C'),
     
'class' => array('draggable'),
    ),
  );
 
$form['tabledrag'] = array(
   
'#type' => 'table',
   
'#header' => $header,
   
'#empty' => t('There is no label yet.'),
   
'#rows' => $rows,
   
'#tabledrag' => array(
      array(
       
'action' => 'order',
       
'relationship' => 'sibling',
       
'group' => 'weight',
      ),
    ),
   
'#attributes' => array(
     
'id' => 'tqbledrag-table',
    ),
  );
 
/**
   * Table with selectable rows.
   */
 
$users = array(
    array(
'uid' => 1, 'first_name' => 'Indy', 'last_name' => 'Jones'),
    array(
'uid' => 2, 'first_name' => 'Darth', 'last_name' => 'Vader'),
    array(
'uid' => 3, 'first_name' => 'Super', 'last_name' => 'Man'),
  );
 
$header = array(
   
'first_name' => t('First Name'),
   
'last_name' => t('Last Name'),
  );
 
$form['tableselect'] = array(
   
'#type' => 'table',
   
'#tableselect' => TRUE,
   
'#header' => $header,
   
'#empty' => t('No users found'),
  );
  foreach (
$users as $user) {
   
$form['tableselect'][$user['uid']] = array(
     
'first_name' => array('#markup' => check_plain($user['first_name'])),
     
'last_name' => array('#markup' => check_plain($user['last_name'])),
    );
  }
?>
+

tel

+

Description: + Format a telephone input element.

+ +

Properties: + #access, #ajaxfter_build, #ajax, + #array_parents, #attached, + #attributes, + #default_value, #description, #disabled, + #element_validate, #maxlength (default: 128), #parents, #placeholder, + #post_render, #prefix, + #pre_render, #process, + #required, #size (default: 30), #states, + #suffix, #theme, #theme_wrappers, + #title, #title_display, + #tree, #type, + #value_callback, #weight

+ +

Usage example:

+
<?php
  $form
['telephone'] = array(
   
'#title' => $this->t('Telephone number'),
   
'#type' => 'tel',
  );
?>
+

text_format

Description: @@ -3816,6 +3972,27 @@ have to add one yourself.

#type, #value, #weight

+

url

+

Description: + Format a URL input element.

+ +

Properties: + #access, #ajaxfter_build, #ajax, + #array_parents, #attached, + #attributes, + #default_value, #description, #disabled, + #element_validate, #maxlength (default: 255), #parents, #placeholder, + #post_render, #prefix, + #pre_render, #process, + #required, #size (default: 60), #states, + #suffix, #theme, #theme_wrappers, + #title, #title_display, + #tree, #type, + #value_callback, #weight

+ +

Usage example:

+
<?php
  $form
['author']['homepage'] = array(
   
'#type' => 'url',
   
'#title' => $this->t('Homepage'),
   
'#default_value' => $comment->getHomepage(),
   
'#maxlength' => 255,
   
'#size' => 30,
   
'#access' => $is_admin || ($this->currentUser->isAnonymous()),
  );
?>
+

value

Description: A form value