How to hide ecard form from teasers and to show it only on the page?

Comments

mssarath’s picture

in the ecard.module file please find out the following

// Add our form as a content item.
$node->content['ecard_form'] = array(
'#value' => drupal_get_form('ecard_form', $node),
'#weight' => 100
);

and replace it with the following

// Add our form as a content item.
if ($teaser == FALSE){
$node->content['ecard_form'] = array(
'#value' => drupal_get_form('ecard_form', $node),
'#weight' => 100
);
}

guy_incognito_uk’s picture

First post for me!

The second line of the replacement code is wrong, the { at the end is not needed? It should read:

if ($teaser == FALSE)

mssarath’s picture

i didn't get exactly on what is wrong, its not necessary to put {} for that if conditions as its single line after that. but for others when they read code it will be difficult to read it. a good ide give nice colors to the {} brackets.
you can have a look at this.
http://drupal.org/coding-standards

mssarath’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.