[development] Form fields in a table

Jeff Greenberg jeff at ayendesigns.com
Fri Sep 3 14:08:12 UTC 2010

Hi Lee,

Well, I think this is a slightly different scenario, so I might need to 
do what you're saying in a different way. It's a multi-page form that 
starts as a a few search fields, and then adds on the results, some of 
which is editable.

So, the flow is like this:

hook_form() {
    turn off #redirect
    build sort form fields
    does form_values have id?
        update form submit was clicked?
            update tables
            query based on contents of sort fields
            loop through result set and create additional form fields
            create table containing mixture of text and form fields
            add submit field

On 09/03/2010 05:14 AM, Lee Rowlands wrote:
> Jeff
> Are you calling drupal_render in the theme function or the form builder?
> You need to call it in the theme function.
> See theme_user_admin_account and user_admin_account, the form is built 
> and returned in user_admin_account (as a flat form) and returned as an 
> array, which is then rendered in theme_user_admin_account as a table.
> Lee
> On Fri, 2010-09-03 at 00:49 -0400, Jeff Greenberg wrote:
>> So there seems to be two problems with the drupal_rendered form 
>> field. One is that in looking at the page source, the option value in 
>> each of these select fields that matches the #default_value are not 
>> marked as selected.
>> The other problem is that the data is not passed back on any of these 
>> fields, and the page source shows each of them having a class of 
>> form_field like the non drupal_render fields, but id="" and name="" 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20100903/5d630e8f/attachment.html 

More information about the development mailing list