I must be missing something. I cannot figure out how to enable resizing of the text areas in the horizontal dimension. They are stuck at 320 pixels wide.

Is this a bug or pilot error?

Thanks

Rich

Comments

voidengine’s picture

I don't know how to enable dynamic horizontal resizing using javascript, but I was able to make the text areas wider by using hook_form_alter() in a custom module:

function mymodule_form_alter($form_id, &$form) {
	switch ($form_id) {
		case 'book_node_form':
			// Make the Page Content textarea larger
			$form['body_filter']['body']['#rows'] = 30;
			$form['body_filter']['body']['#cols'] = 108;
			break;	
	}	
}
physiotek’s picture

can you explain how i do a cutom module please?
pht3k

voidengine’s picture

pht3k,

Just like the template.php file for themes, think of modules as another place where you can put code that alters how your website works.

The handbook page is here: http://drupal.org/node/508
I learned how to do it by reading this: http://www.drupalbook.com/

Quick Summary

  1. Make a directory in /sites/all/modules/ called "mymodule"
  2. Configure a text file called "mymodule.info" and put it in the mymodule directory
  3. Put code in a text file called "mymodule.module" and put it in the mymodule directory
  4. Go to the admin page for modules and turn on the 'mymodule' module.

Here is the code in my myformedits.info file:

; $Id$
name = myformedits
description = My custom edits to site forms.
package = MyCustomModules
version = "5.x-1.x-dev"

And the code in the myformedits.module file is listed above.

To alter forms you should read up on Forms API: http://drupal.org/node/37775

I learned a lot by reading the Pro Drupal Development book (link is above)

Good luck!
Ray

physiotek’s picture

thanks voidengine,

i will try to create a custom module after the holidays.
this looks like very interesting links
thanks a lot.

pht3k

GabiAPF’s picture

I need to change the height of the textarea. I tried the suggestion on comment 1: http://drupal.org/node/195603#comment-650837 (even changed the number of rows to 40) but the textarea didn't grow at all. The writeable space is still 78px heigh, which is too short for my needs? Is there any way to change that? Why didn't that work?

mupsi’s picture

Issue summary: View changes
Status: Active » Closed (outdated)