I'm using Zend_Form for handling a form and I have a problem with localization.
I use following field declaration:
$this->addElement('text', 'area', array(
'label' => 'Area:',
'required' => true,
'filters' => array('StringTrim', 'NormalizedToLocalized')
));
The problem is, I use pl_PL locale and in this locale the decimal point separator is "," not ".". But database (MySQL) stores float with "." separator.
I added NormalizedToLocalized to convert e.g. 40.12 into 40,12 in my html form.
But when passing 40,12 in POST request I want Zend_Form to automatically convert back value 40,12 into 40.12 so that it can be passed to DB (I collect values from form using $form->getValues() method). By now it renders 40,12 successfully but in $form->getValues() I get localized, not not normalized value.
So my question is, whether it is possible to create different filter for rendering and getting value of field in Zend Framework.
Thanks in advance for your help!