Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By richard.c.allen2386 on
Hi I'm trying to disable resizing on my body field and have tried a few things with no sucess, after reading some of the documentation I can't seem to figure out what I am doing wrong. I have tried two approaches in my node-content_type-edit.tpl first the simple one.
[code]
$form['body_field']['body']['#resizable'] = 0; //(false was not setting the value for some wierd reason but 0 does work)
[/code]
and then the more complicated approach that I found mentioned here http://drupal.org/node/68684#comment-2872584
[code]
unset ($form['body_field']['body']);
$form['body_field']['body'] = array(
'#type' => 'textarea',
'#title' => check_plain($type->body_label),
'#default_value' => $node->body,
'#rows' => 20,
'#required' => TRUE,
'#resizable' => FALSE);
[/code]
Anyone have any ideas on what I need to do or am doing incorrectly?
Comments
try this
try use the below code.
$form['body'][LANGUAGE_NONE][0]['value']['#resizable'] = FALSE;
thank
thank for information http://sikartun.com