I have been seeing the warning of Undefined index in tao_textarea() whenever a textarea form element in a module has something similar to the following:

  $form['embedscript'] = array(
    '#type' => 'textarea',
    '#attributes' => array('id' => 'embed-content', 'name' => 'embed-content'),
    '#title' => t('Embed Script'),
    '#required' => FALSE,
    '#value' => get_embed_script($data->nid),
    '#cols' => 60,
    '#rows' => 12,

Seems that tao_textarea() directly sets $element['#attributes']['name'] equal to $elements['#name'] which may not always be set since it is not part of fapi documentation. FAPI documentation does however mention using #attribute associative array. Hence I propose the following patch.

Members fund testing for the Drupal project. Drupal Association Learn more


nicholas.alipaz’s picture

patch attached.