Maybe I Don't Want that in my Form
And inevetibally, there is more stuff I don't want in my forms, want differently, or want moved.
My solution has been that on all the sites I develop I have a custom module. In this modules is one of my most used hooks... form alter. I have it all set up and commended out some of the lines but leave them in for quick reference...
I'll show it to you, then explain a little more....My module name is theme_thingee, and here's how I have it set up.
function thingee_theme_form_alter(&$form, &$form_state, $form_id) {
//print ('<pre>');
//print_r($form);
//print ('</pre>');
//dsm($form_id);
//dsm($form);
unset($form['body_field']['teaser_include']);
$form['body_field']['body']['#rows'] = 5;
switch ($form_id) {
// Views Exposed Filters
case 'views_exposed_form':
$form['submit']['#value'] = t('Search'); // default is 'apply'
break;
// Form Comment
case 'comment_form':
drupal_set_title('Post Your Comment');
break;
}
}- The first three lines give me a nice printout in my source... good when I want to see what is happening as a non-logged in user.
- The next, when you have devel installed. A quick message at the top that prints the form ID is very nice and quick.
- And dsm on $form with devel is fast and easy with the Krumo window.
- Next here is my unset of the "split summary at cursor".
- Followed by changing the number of rows on the body field.
- The Switch - here is where I use the form ID to make specific changes for specific forms. each case is a different form ID. It allows me fine grain control all in one place.



Comments
We have been selling prom
replica Rolex Yachtmaster
Great Articles………….. thank
Arts
You probably spent quite a
Abercrombie Jeans
Replica Watches Fake
replica Rolex Yachtmaster
replica rolex
replica Rolex Yachtmaster
http://www.rhineweddingstore.com
replica Rolex Yachtmaster
China Wholesale Wholesale
replica Rolex Yachtmaster
High quality fake rolex
replica Rolex Yachtmaster
Christian Louboutin|Louboutin
wedding dresses
This is my first time i visit
replica Rolex Yachtmaster
Give me a pair of Christian
I know a very nice prom
fashion style vogue
Crystal Jewelry,Crystal Necklace,Handmade Crystal Jewelry,Wholes
Adidas Shoes Online Shop-Hot
replica rolex
UGG Boots|Classic UGG Boots Sale-Cozy UGG Boots UK Sheepskin Boo
http://www.excelwatch.com
http://www.excelwatch.com
replica Rolex Yachtmaster
Post new comment