Hi,
Having recently delved into the world of Phalcon from a background using Zend Framework, I'm really impressed with Phalcon so far - great work!
I'm looking for a method to return filtered values when using filters with Phalcon\Forms\Form.
I have a form that makes use of filters to validate the data (lowercase and trim the value):
public function initialize()
{
...
$guid = new Text('guid');
$guid->setFilters(array('lower', 'trim'));
$this->add($guid);
...
}
However I'm unable to get the filtered values, using $form->getValue('guid') in my controller returns the raw value, not filtered, however it seems that the validation is carried out on the filtered values (as expected).
$form = new Application();
if ($this->request->isPost()) {
$data = $this->request->getPost();
if ($form->isValid($data)) {
echo $form->getValue('guid'); // Raw value
}
}
I've been scanning the documentation, github issues and this forum but unable to determine if this is possible or I'm doing something wrong.
The only mention in the docs is here, but there are no examples or additional info on getting filtered values.
Can anybody point me in the right direction of what I should be doing to get the filtered values?
Many thanks.
Steve