How can I set ID attribute for drupal 7 form elements?
drupal, drupal-7, drupal-fapi
Solution
//Here is an example
$form['name'] = array(
'#type' => 'item',
'#title' => t('Title'),
'#attributes' => array(
'id' => 'your-id',
),
);
Problem
I want to set the `ID` attribute of an element of a form that I'm creating in a module using the form API.