I would like to make a small request to the forms API, I would like to have the ability to use label prefix and suffix on all elements that have labels.
Example:
$form['mail'] = array(
'#type' => 'textfield',
'#title' => t('E-mail'),
'#required' => TRUE,
'#label_prefix' => '<div>Labelprefix',
'#label_suffix' => 'Labelsuffix</div>',
'#field_prefix' => 'Fieldprefix',
'#field_suffix' => 'Fieldsuffix',
}
At the moment the forms API allows you to insert #field_prefix and #field_suffix, but those are only in front of or after the themed textfield.
My request would make the HTML for a textfield to look something like this:
Fieldprefix<div>Labelprefix<label>E-mail</label>Labelsuffix</div>
<input ....>Fieldsuffix
Closed: won't fix
7.0 ⚰️
Last updated
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.