Issue #2803923 by gianani, shashikant_chauhan, joachim: Table render element docs don't explain how to do colspan
parent
5c4a8dfbe6
commit
af89f803d0
|
@ -33,7 +33,8 @@ use Drupal\Component\Utility\Html as HtmlUtility;
|
|||
* '#header' => array($this->t('Name'), $this->t('Phone')),
|
||||
* );
|
||||
*
|
||||
* for ($i=1; $i<=4; $i++) {
|
||||
* for ($i = 1; $i <= 4; $i++) {
|
||||
* $form['contacts'][$i]['#attributes'] = array('class' => array('foo', 'baz'));
|
||||
* $form['contacts'][$i]['name'] = array(
|
||||
* '#type' => 'textfield',
|
||||
* '#title' => $this->t('Name'),
|
||||
|
@ -46,6 +47,11 @@ use Drupal\Component\Utility\Html as HtmlUtility;
|
|||
* '#title_display' => 'invisible',
|
||||
* );
|
||||
* }
|
||||
*
|
||||
* $form['contacts'][]['colspan_example'] = array(
|
||||
* '#plain_text' => 'Colspan Example',
|
||||
* '#wrapper_attributes' => array('colspan' => 2, 'class' => array('foo', 'bar')),
|
||||
* );
|
||||
* @endcode
|
||||
* @see \Drupal\Core\Render\Element\Tableselect
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue