For Drupal 7: the best way to process (or use) the Drupal text filter system is to use not the "textarea", but the type of the text_format field like this, which will display the text field with the filter selected below
$form['holycrap'] = array(
'#type' => 'text_format',
'#format' => NULL,
'#title' => t('The HTML for the Holy Crap block above the Main Menu.'),
'#default_value' => variable_get('caplogin_holycrap', _caplogin_holycrap_default_html()),
);
return $form;
source
share