Is it possible to have "checkbox" in the "edit view" section of a module in dashboard?
I have followed the following tutorial on creating a simple guestbook module:
http://www.sitepoint.com/getting-started-with-fuel-cms-2/If you look at the part where we are editing a guestbook entry, the visible field is shown with 'yes' and 'no' radio buttons. Well, this is because that field is an Enum with 'yes' and 'no' values in the database. Now is it possible to have a checkbox instead of these radio buttons? I changed the type of 'visible' field to boolean in database, but didn't get a checkbox in the dashboard view for that field. How can I achieve this? Any advice would be appreciated.
Comments
function form_fields($values = array(), $related = array()) { $fields = parent::form_fields($values, $related); $fields['visible'] = array('type' => 'checkbox', 'value' => 1); return $fields; }
http://docs.getfuelcms.com/general/models#hooks
You can also set in the model the following to allow you to toggle the visibility from the list view:
public $boolean_fields = array('visible');