[development] Form fields in a table

Jamie Holly hovercrafter at earthlink.net
Fri Sep 3 15:14:52 UTC 2010

  If you are doing this for your own site or for a client and not for 
something that will be used my many sites, I have found just using 
#prefix #suffix in the form fields work out great.

It's not the most "drupaly" way of doing things, but it does work and 
gets the job done rather fast.

Jamie Holly

On 9/3/2010 11:03 AM, Jeff Greenberg wrote:
> It's confused the heck out of me :-)  in terms of which element to
> #theme...  Some of the form fields are in a table, rather than a table
> containing the form. So at first blush, it would seem that theming
> individual fields wouldn't work, nor would theming the entire form...
> create a fieldset around the table and theme it?
> On 09/03/2010 10:38 AM, John Fiala wrote:
> >  Generally what you want to do to get a table as part of a form is to
> >  declare a theme function that you then assign as '#theme' =>
> >  'function_name', where the theme function is theme_function_name.
> >
> >  This used to confuse the heck out of me, and then I went in and read
> >  through the code on the admin/content/node page, which is a pretty
> >  good example of how to display a form in a table, I think.
> >
> >
> >

More information about the development mailing list