List Info

Thread: display table in user_edit form




display table in user_edit form
user name
2006-09-25 23:33:52
Question about displaying form fields in a table.  I've
read some 
documentation <http://drupal.org/n
ode/47582>.  The solution described there 
involves defining a theme function named after the form_id.

In my case, the form is a category in user edit pages.  This
means I don't 
have control over the form_id.  It's 'user_edit', and the
same form_id is 
used for all categories on the user edit pages.

So, while I could define theme_user_edit() to render my form
as a table, I 
don't think that's the right way.  Because while my module
could do it, it 
would be incompatible with any other modules or themes that
also define 
theme_user_edit().

Can anyone recommend a workaround or other way to render a
table on the user 
edit pages?

Thanks,

-Dave
display table in user_edit form
user name
2006-09-26 01:49:35
you can use #theme property for the form that you add. again you should implement a function named theme_(value of #theme). using form_alter hook you can define theme functions for any part of the user edit form.

On 9/26/06, Dave Cohen <dave-cohen.com">drupaldave-cohen.com> wrote:
Question about displaying form fields in a table.&nbsp; I've read some
documentation < http://drupal.org/node/47582&gt;. &nbsp;The solution described there
involves defining a theme function named after the form_id.

In my case, the form is a category in user edit pages.&nbsp; This means I don't
have control over the form_id.&nbsp; It's 'user_edit', and the same form_id is
used for all categories on the user edit pages.

So, while I could define theme_user_edit() to render my form as a table, I
don't think that's the right way.  Because while my module could do it, it
would be incompatible with any other modules or themes that also define
theme_user_edit().

Can anyone recommend a workaround or other way to render a table on the user
edit pages?

Thanks,

-Dave

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )