Hi all,
I built a form in order to edit a record loaded from DB, so I have to pre fill the fields in the form with saved data.
I don't use the standard element "DB Record Loader", since I have to do some operations with those data. I have no problems with textfield, in fact in a "Custom code" element I use:
the problem is that I can't set a checkbox checked.
The field in DB table has 'Y'/'N' values.
Is there a way to do this?
Thank you in advance.
2caffe
I built a form in order to edit a record loaded from DB, so I have to pre fill the fields in the form with saved data.
I don't use the standard element "DB Record Loader", since I have to do some operations with those data. I have no problems with textfield, in fact in a "Custom code" element I use:
$db =& JFactory::getDBO();
$query = "...";
$db->setQuery($query);
$row = $db->loadAssoc();
$form->data['at_dataint'] = $row['at_dataint'];
the problem is that I can't set a checkbox checked.
The field in DB table has 'Y'/'N' values.
Is there a way to do this?
Thank you in advance.
2caffe