Good day Drupalers: When creating a new content type, it seems that I cannot change the width of the TITLE field. For all other fields that I create, I can set the width. Anyone know how to make this change? I found something on drupal.org saying you can do it with CSS but I wonder if that's the best or only way? http://drupal.org/node/113399#comment-193937 Thanks, -- Gary Broyhill Webmaster Lenoir-Rhyne University www.lr.edu gary.broyhill@lr.edu (828)328-7379
Hey Gary. Changing the width of any field is best done using CSS. You can also disable the Title field by overriding it using the Automatic Nodetitles<http://drupal.org/project/auto_nodetitle>module and creating a new title field using CCK. Cheers! Jake Roufa 208.557.9390 http://jacobroufa.com On Wed, Nov 17, 2010 at 2:20 PM, Broyhill, Gary <Gary.Broyhill@lr.edu>wrote:
Good day Drupalers:
When creating a new content type, it seems that I cannot change the width of the TITLE field. For all other fields that I create, I can set the width.
Anyone know how to make this change? I found something on drupal.orgsaying you can do it with CSS but I wonder if that’s the best or only way? http://drupal.org/node/113399#comment-193937
Thanks,
-- Gary Broyhill Webmaster Lenoir-Rhyne University www.lr.edu gary.broyhill@lr.edu (828)328-7379
-- [ Drupal support list | http://lists.drupal.org/ ]
you want to look into making your own mini-module and use form_alter to adjust the width of the text field once you've got the correct form, you need something like this: $form['title']['#size'] = 55; or whatever size you want. here is what you'd need for the blog create form - changes title field size and alters its label too. function mymodule_form_alter(&$form, $form_state, $form_id) { if($form_id == blog_node_form) { # alters blog node create form. Changes 'Title' to 'Title of blog post' and alters size of title text box. $form['title']['#title'] = t('Title of blog post'); $form['title']['#size'] = 55; } } Remember to change "mymodule" to your actual module title and make .info file too. On 17/11/2010 18:20, Broyhill, Gary wrote:
Good day Drupalers:
When creating a new content type, it seems that I cannot change the width of the TITLE field. For all other fields that I create, I can set the width.
Anyone know how to make this change? I found something on drupal.org saying you can do it with CSS but I wonder if that's the best or only way? http://drupal.org/node/113399#comment-193937
Thanks,
-- Gary Broyhill Webmaster Lenoir-Rhyne University www.lr.edu gary.broyhill@lr.edu (828)328-7379
participants (3)
-
Broyhill, Gary -
Jacob Roufa -
Neil Coghlan