TinyMCE not appearing on custom form I am creating a custom form and have run into a problem. I'm using the WYSIWYG module and for some reason the text areas  on this custom form don't show as rich text editors (tinymce shows on other parts of he site) 

    $form['terms_format'][implode('~', array(MODULE_NAME, FIELD_TERMS))] = array(
    '#title'         =&gt; t('Terms and Conditions')
   ,'#type'          =&gt; 'textarea'
   ,'#description'   =&gt; t('Terms and conditiona')
   ,'#default_value' =&gt; variable_get(implode('~', array(MODULE_NAME, FIELD_TERMS)), "")
   ,'#required'      =&gt; TRUE
);
$form['terms_format']['format'] = filter_form(FILTER_FORMAT_DEFAULT);


Any ideas what i'm doing wrong? I'm using drupal 6.
you need to specify the format value 'format' =&gt; 'filtered_html' to allow filtered html or '#format' => 'full_html'

$form['terms_format'][implode('~', array(MODULE_NAME, FIELD_TERMS))] = array(
    '#title'         =&gt; t('Terms and Conditions')
   ,'#type'          =&gt; 'textarea'
   ,'#description'   =&gt; t('Terms and conditiona')
   ,'#default_value' =&gt; variable_get(implode('~', array(MODULE_NAME, FIELD_TERMS)), "")
   ,'#required'      =&gt; TRUE
   'format' =&gt; 'filtered_html',
);


For drupal 6 try

if (!isset($edit['format'])) {
  $edit['format'] = FILTER_FORMAT_DEFAULT;
}
$form['terms_format']['format'] = filter_form($edit['format']);


Make sure your default filter format is filtered html or full html