[support] Drupal 7 Forms

Metzler, David metzlerd at evergreen.edu
Mon May 14 21:22:02 UTC 2012


Whereas what you did does work, I think the "Drupal way" solution would
be to use a #theme attribute in the array returned by drupal_get_form
prior to calling drupal_render.  

I've done the print and exit strategy before when generating unthemed
output, but it sounds like what you're really doing is generating
differently themed output. 

I'm not sure that using drupal_render is slicker, and for a one-off
client solution may not be worth your while, but if you were developing
a module that needed to theme stuff differently, I think that it would
be the way to go. 

Dave

-----Original Message-----
From: support-bounces at drupal.org [mailto:support-bounces at drupal.org] On
Behalf Of Fred Jones
Sent: Monday, May 14, 2012 1:30 PM
To: support at drupal.org; Ms. Nancy Wichmann
Subject: Re: [support] Drupal 7 Forms

> Well, I'm not sure I understand exactly what you're trying to see. But
I
> never, ever, use "die" in Drupal; and very rarely "echo."

I'm seeing the right output. The client wants to submit a form, and
then see a certain .tpl file, populated with data based on his inputs.
It works fine. Just wondering if there's a slicker way.... :)

I thought maybe of changing the callback to a regular function and
then have that check if it should be a form or regular output.

Fred
-- 
[ Drupal support list | http://lists.drupal.org/ ]


More information about the support mailing list