Hello. I have big problem with my validation. I have register form and validator extending RequiredFields. Validation works but I cant figure out how to clear password fields after every wrong submit. Password is ConfirmedPasswordField with default validator.
public function RegisterForm() {
$form = new Form (
$this,
'RegisterForm',
$this->getProfileFields('Registration'),
new FieldList(
new LiteralField ('content', $this->obj('RegistrationContent')),
new FormAction('register', _t('MemberProfiles.REGISTER', 'Register'))
),
new MemberProfileValidator($this->Fields())
);
return $form;
}