On Tue, Jun 16, 2009 at 12:49 AM, Matthew
Ratzloff<[email protected]> wrote:
> You can replace it with a substitute token. There are a variety of
> perfectly valid ways to go about it.
> -Matt
Ok I read the documentation and now I understand that my problem could
be solved with custom filter (or probably Escapers). The thing that is
not clear to me now is how to implement this.
1. Where does my custom filter code go? controller? or form?
2. After that how to add in filter chain and how to add that custom
filter in my form field?
My directory structure is:
application
captcha
config
controllers
forms
layouts
scripts
models
dbtable
views
scripts
Currently in my form, the search field is implemented as follows:
public function init()
{
$mysearch = New Zend_Form_Element_Text('srchstr');
$mysearch->setLabel('Search For:');
$mysearch->setAttrib('size', '30');
$mysearch->addFilter('StringTrim');
...
...
...
}
Its kind of confusing. Any suggestion (or code sample) greatly appreciated.
Thanks again