[development] Form fields in a table
Jeff Greenberg
jeff at ayendesigns.com
Fri Sep 3 01:51:15 UTC 2010
So almost there. Before, the form fields were being rendered when
declared ,prior to the table, and they (selects) were showing the
default value. I left everything as is, and when I refer to the form
field in the array being formatted as a table, I encased it in
drupal_render. I'm now getting the populated form field in the table
and not outside it, but they no longer display the default value they
were declared with.
On 09/02/2010 08:49 PM, Lee Rowlands wrote:
> Hi Jeff
> You need to call drupal_render on the form field.
> Have a look at theme_user_admin_account for a good example, this
> generates the list of users with the checkbox at /admin/user/user
>
> Lee
> On Thu, 2010-09-02 at 20:20 -0400, Jeff Greenberg wrote:
>> Using FAPI for a form (D6), and in the form is a markup field, which is
>> a table created with theme(). Some of the cells in the table need to be
>> populated with form fields. The contents of the table is being sent to
>> theme() as $rows, and I've tried having the cells in question defined as
>> $form[myfield] that has been created earlier, but I end up with an empty
>> cell, and the form field appearing where it was first defined, prior to
>> the table... so...
>>
>> $form[myfield] = array(...
>>
>>
>> $rows[this_row] = array(cellval, cell2val, $form[myfield] ...
>>
>>
>> isn't working.
>>
>>
>> I need something like
>>
>>
>> Row 1 text text selectbox text
>> textfield text
>>
>>
>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20100902/3893e684/attachment-0001.html
More information about the development
mailing list