Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS /

Confirmation message on custom forms


Reply


2 Posts   1271 Views

Avatar
pbertrand

Community Member, 8 Posts

28 April 2009 at 3:57am

Edited: 28/04/2009 3:58am

Hello, i've got a custom form of this type :

         $fields = new FieldSet(
         new TextField('Email'),
         new PasswordField("Password"),
         new LabelField("Forgot your password ?'.")
         );
         // Création des actions
         $actions = new FieldSet(
            new FormAction('doLogin', 'Login'),
            new FormAction('generateNewPass', 'Forgot my password')
         );
         $validator = new RequiredFields('Email', 'password');
      
      return new Form($this, 'loginForm', $fields, $actions, $validator);

I wan't to put a confirmation message on the "Forgot my password" button.
Does anyone know how to do this ?

thanks.

Avatar
pbertrand

Community Member, 8 Posts

29 April 2009 at 12:16am

Found we must use a ConfirmedFormAction:

// Création des actions
$actions = new FieldSet(
new FormAction('doLogin', 'Login'),
new ConfirmedFormAction('generateNewPass', 'Forgot my password')
);