Page 1 of 16
1 · 2 · 3 · 4 · 5 · 6 · 7 · 8 · 9

Sacha :: 22.01.2010 03:37:06
I've had an error saying the class 'Sanitize' wasn't found.
(using cake 1.2)

I fixed it by adding:
App::import('Core', 'Sanitize');
in plugins/filter/models/behaviors/filtered.php @ line 170

Is this correct procedure ? Or is there a better fix ?
Sacha :: 22.01.2010 03:45:06
Is it possible to add 2 date search options, for 1 date field ?

To able to search between 2 dates, 'range between'...

fe: Find all where Docu.date >= lastweek AND Docu.date <=yesterday

Can this be implemented ?
lecterror :: 22.01.2010 05:20:06
Hi Sacha!

It is possible to add that kind of filtering, but it is not there by default.

The "right" way to implement it would be to use beforeDataFilter() and/or afterDataFilter() callbacks provided by the plugin to modify your search query (basically, you provide fake input fields, parse their input and convert it to a find() condition in those two callbacks). Maybe I should write that "advanced usage" guide after all. :-)

Also, thanks for telling me about the missing import, I've corrected it in the repo.
Agota Perez :: 25.01.2010 02:50:13
Hi there,
Thanks for a wonderful plugin, I am using it on my current project and it works like a charm. I was just wondering there is a simple way to do a 'reset' to clear the form data? I tried '<button type="submit" name="data[reset]" value="reset">Reset</button>' but it doesn't clear the form. Any help will be much appreciated.
lecterror :: 25.01.2010 15:09:56
Hi Agota!

The thing about reset buttons is that they reset the form to their *default* values, those encoded in HTML itself. You can use the non-default methods of the plugin helper (beginForm, inputFields, endForm) to generate your search form and "inject" your own button before calling endForm(). With that button you can reset the form (probably by using javascript and submitting the form).

Let me know if you need any help, email me and I'll try to answer as soon as I'm able to.

Cheers!