Advanced search and modules

edited June 2014 in Share
I'm trying out the "advanced search" available in the simple modules. I have set up models with filters, and I can see the advanced drop-down available on the list page - but it is empty (in Firefox & Chrome on Windows)?

The example above has:
public $filters = array('last_name', 'email', 'postcode', 'order');
In MY_fuel_modules.php I have:
$config['modules']['bookings'] = array( 'sanitize_input' => array('template', 'php'), 'exportable' => TRUE, 'advanced_search' => TRUE );


  • edited 3:46AM
    The $filters property on the model says which fields to include when doing a filter. The form controls for filtering are controlled by creating either a "filters" method on your model, or adding the "filters" parameter to the module's configuration in MY_fuel_modules.php (I know... it's a bit confusing since they are both named "filters"). See the example below:
    ... 'filters' => array('category' => array('type' => 'select', 'label' => 'Category', 'model' => array(FUEL_FOLDER => 'fuel_categories_model'), 'first_option' => 'Select a form...') );
  • edited 3:46AM
    That's fantastic! I forgive the name clash!
Sign In or Register to comment.