Drupal filter_form form input
Posted
by ernie
on Stack Overflow
See other posts from Stack Overflow
or by ernie
Published on 2010-06-09T21:08:38Z
Indexed on
2010/06/09
21:12 UTC
Read the original article
Hit count: 355
This drupal form snippet will give me a textarea with user able to change filter to full html/wysiwyg mode.
My Questions: How can I default to to full html mode?
function MY_MODULE_admin() {
$form = array();
$form['format'] = filter_form($form->format);
// MY_MODULE - ** Image 1 **
$form['MY_MODULE_image_1'] = array(
'#type' => 'textarea',
'#title' => t('Image 1'),
'#default_value' => variable_get('setup_image_1', 'image_1.jpg'),
'#description' => "Current value =" .variable_get('setup_image_1', 'image_1.jpg'),
'#required' => TRUE,
);
© Stack Overflow or respective owner