Default Settings and Params
FieldFrame 0.9.2 and later allows you to specify default site settings, field settings, cell settings, and tag parameters. Here’s how:
class Checkbox_group extends Fieldframe_Fieldtype {
// ...
var $default_site_settings = array(
'option_template' => '<li>{option}</li>'
);
var $default_field_settings = array(
'options' => array('option1', 'option2', 'option3')
);
var $default_cell_settings = array(
'options' => array('option1', 'option2', 'option3')
);
var $default_tag_params = array(
'sort' => '',
'backspace' => '0'
);
// ...
}
Each of these are optional, but recommended. It will save you the hassle of checking to make sure that a setting or a parameter is already set, which is an easy thing to forget to do, especially if you’re developing in an environment that doesn’t log PHP warning messages.