Add documentation for #description_display option

Created on 26 September 2015, over 9 years ago
Updated 26 March 2025, about 2 months ago

API page: https://api.drupal.org/api/drupal/developer!topics!forms_api_reference.h...

We need to add the attribute #description_display on this documentation page. Check the parent issue to find out more details about this option.

Used by: Same as #description.

Description: Description display setting. It can have these values:
- before: The description is output before the element.
- after: The description is output after the element. This is the default value.
- invisible: The description is output after the element, hidden visually but available to screen readers.

Values: before, after (default), invisible.

Required: Not required.

Usage example:

$form['weight'] = array(

  '#type' => 'weight', 

  '#title' => t('Weight'), 

  '#default_value' => $edit['weight'], 

  '#delta' => 10, 

  '#description' => t('Optional.
In the menu, the heavier items will sink and the lighter items will be
positioned nearer the top.'),

  '#description_display' => 'before',

);
📌 Task
Status

Closed: won't fix

Component

API documentation files

Created by

🇬🇷Greece TheodorosPloumis Greece

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024