Home » Database » DB_Table » Bug #5382
Radios not filled with default Value
Details
| Submitted | 2005-09-13 12:34 UTC |
|---|---|
| From | arne dot bippes at brandao dot de |
| Assigned | wiesemann |
| Status | Closed |
| Package | DB_Table |
| PHP Version | 4.3.4 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2005-09-13 12:34 UTC] arne dot bippes at brandao dot de
Description:
------------
This refers to BUG #4935. Same Script, (naming is now working) but now I fetch the table to fill in the default values for the form. This is working as expected with input fields but not with radio-buttons.
Filling the form manually with:
$form->setDefaults(array('bdocore_groups[is_active]'=>'Y'));
is working.
Test script:
---------------
$form =& $object_table->getForm(
$cols
, 'table_name'
, array('trackSubmit' => true,
'action' => $action ));
i.e. $cols contains the following:
(
[group_id] => 23
[group_type] => 0
[group_define_name] => Mein zweiter TEst
[owner_user_id] => 0
[owner_group_id] => 0
[is_active] => Y
)
is_active is defined the following:
'is_active' => array(
'type' => 'char',
'size' => 1,
'require' => true,
'qf_label' => 'Freigeschaltet',
'qf_type' => 'radio',
'qf_vals' => array('Y' => 'Ja' ,'N' => 'Nein'),
),
Expected result:
----------------
<input value="Y" id="qf_76e751" name="bdocore_groups[is_active]" checked="checked" type="radio"><label for="qf_76e751">Ja<br></label>
<input value="N" id="qf_49122a" name="bdocore_groups[is_active]" type="radio"><label for="qf_49122a">Nein<br></label>
Actual result:
--------------
<input value="Y" id="qf_76e751" name="bdocore_groups[is_active]" type="radio"><label for="qf_76e751">Ja<br></label> <input value="N" id="qf_49122a" name="bdocore_groups[is_active]" type="radio"><label for="qf_49122a">Nein<br></label>
[2005-09-13 12:37 UTC] arne dot bippes at brandao dot de
DB_Table
Version 1.2.0
Release Date 2005-08-29
Release State stable