ckeditor with drupal custom form
I created m开发者_开发百科y own module form which include address textarea
$form['address'] = array(
'#input_format' => '1',
'#rows' => '5',
'#weight' => '4',
'#type' => 'textarea',
'#title' => t('Address'),
);
when i run the form i got the following help below it
CKEditor: the ID for excluding or including this element is customers/edit/5.edit-address.
so i got the element ID and entered it in the include setting of the ckeditor
but still the editor doesn't appear on that field, am I missing something ?
use a #type of "text_format" with a #base_type of "textarea" and it should work. like this:
$form['address'] = array(
'#input_format' => '1',
'#rows' => '5',
'#weight' => '4',
'#type' => 'text_format',
'#base_type' => 'textarea',
'#title' => t('Address'),
);
精彩评论