Hello!
I thought I'll find a solution for this on the forum, but was surprised to see no questions about it.
The problem I have is that when user inputs a wrong password in the form and the page with the form reloads, Phalcon's Form will set the value of the password field to whatever user had input. I want this field to never have a value. Is there a parameter I may have overlooked that would prevent Phalcon from giving a value to password field?
Here's the password field's code:
class PasswordRequiringForm extends Form
{
public function initialize ()
{
$password = new Password('password', [
'class' => 'form-control input-md',
'placeholder' => 'Password'
]);
$password
->setLabel('Your password:')
->addValidators([
new PresenceOf([
'message' => 'The password is required to authorize the change.',
'cancelOnFail' => TRUE
]),
new PasswordValidator([
'message' => 'The password you input is incorrect.'
]),
])
->setUserOption('type', 'input');
$this->add($password);
}
}
Thank you!