[development] Form fields in a table

nan wich nan_wich at bellsouth.net
Fri Sep 3 02:59:16 UTC 2010


$form[myfield] is an array. Assuming you only want the value then use 
$form[myfield]['#value'] or $form[myfield]['#default_value'].
 
Nancy




________________________________
From: Jeff Greenberg <jeff at ayendesigns.com>
To: development at drupal.org
Sent: Thu, September 2, 2010 8:20:20 PM
Subject: [development] Form fields in a table

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/269d5fd4/attachment.html 


More information about the development mailing list