[development] problem with theme form drupal_render
Carl Wiedemann
carl.wiedemann at gmail.com
Sat Mar 26 03:13:17 UTC 2011
>
> Instead of "print $messages", please try "drupal_set_message($message)"
This should NOT be used in the theme layer. The $messages variable is
already set for the current request and will not be rendered until the
following request.
If you don't see $messages in your template, it's likely that the variable
simply doesn't exist. Use a preprocess function to determine what variables
are available. See http://drupal.org/node/223430
On Fri, Mar 25, 2011 at 6:06 PM, Austin Einter <austin.einter at gmail.com>wrote:
> Instead of "print $messages", please try "drupal_set_message($message)"
>
> Thanks
> Austin.
>
>
> On Sat, Mar 26, 2011 at 3:25 AM, Damian Adriel Perez Valdes <
> damian.adriel at gmail.com> wrote:
>
>> hi:
>>
>> i have a problem. I have a theme for my form, but I can't show the message
>> error. What can I do ?
>>
>> thanks.
>>
>>
>> *form.tpl.php*
>> <?php if ($show_messages && $messages): print $messages; endif; ?>
>>
>> <?php echo drupal_render($form["nombres"]); ?>
>> <?php echo drupal_render($form["submit"]); ?>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20110325/9ef00625/attachment.html
More information about the development
mailing list