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
I think I posted my question in the wrong place... could you please move it in the right place?
Thanks.
Thanks.
Hi 2caffe,
Does your checkbox have 2 or more options and at least 2 of them has the values "Y" and "N" case sensitive ?
Regards,
Max
Does your checkbox have 2 or more options and at least 2 of them has the values "Y" and "N" case sensitive ?
Regards,
Max
This topic is locked and no more replies can be posted.