Hi all !
Below is my search function, BienImmo being my DataObject...
public function getCustomSearchContext() {
$locs = DataObject::get('Localite');
if ($locs) {
$locs = $locs->toDropdownMap('ID', 'Ville', ' - Ville - ', true);
}
$fields = new FieldSet(
new CheckboxSetField(
$name = "Loc_Ville",
$title = "Ville(s) :",
$source = $locs,
$value = ""
),
new TextField('PrixMin', 'Prix Min'),
new TextField('PrixMax', 'Prix Max')
);
$filters = array(
'Loc_Ville' => new ExactMatchMultiFilter('LocaliteID'),
'PrixMin' => new GreaterThanFilter('Prix'),
'PrixMax' => new LessThanFilter('Prix')
);
return new SearchContext(
$this->class,
$fields,
$filters
);
}
I need to remember the search parameters in the Results Page.
How can I get those in the results page template ?
A better thing would be to re-fill the form with those parameters (checkboxes checked, fields filled....).
Would it be possible ? Is SilverStripe THIS magical ? ;)