Issue #2779999 by shashikant_chauhan, guilhermevp, dww, joachim, xjm: Document checkboxes and radios element can have individual descriptions

(cherry picked from commit 46cc0e0fcb)
merge-requests/2071/head
Lauri Eskola 2022-03-26 19:09:26 +02:00 committed by xjm
parent 529d4a64b0
commit 0bddb1445f
No known key found for this signature in database
GPG Key ID: 206B0B8743BDF4C2
2 changed files with 12 additions and 0 deletions

View File

@ -23,6 +23,12 @@ use Drupal\Core\Form\FormStateInterface;
* );
* @endcode
*
* Element properties may be set on single option items as follows.
*
* @code
* $form['high_school']['tests_taken']['SAT']['#description'] = $this->t('Description for the SAT option.');
* @endcode
*
* @see \Drupal\Core\Render\Element\Radios
* @see \Drupal\Core\Render\Element\Checkbox
*

View File

@ -22,6 +22,12 @@ use Drupal\Component\Utility\Html as HtmlUtility;
* );
* @endcode
*
* Element properties may be set on single option items as follows.
*
* @code
* $form['settings']['active'][0]['#description'] = $this->t('Description for the Closed option.');
* @endcode
*
* @see \Drupal\Core\Render\Element\Checkboxes
* @see \Drupal\Core\Render\Element\Radio
* @see \Drupal\Core\Render\Element\Select