[development] Form fields in a table
jeff at ayendesigns.com
Fri Sep 3 14:08:12 UTC 2010
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:
turn off #redirect
build sort form fields
does form_values have id?
update form submit was clicked?
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:
> 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.
> 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...
More information about the development