Example #1
0
 public function __construct($url = "/auth/pass")
 {
     // add form fields
     $form = new formBuilder('recoverpass', array('submitURL' => $url, 'successURL' => $url . '/message/1/', 'method' => 'POST', 'label' => 'send'));
     $form->addText('username', array('label' => 'Username', 'required' => true));
     $this->form = $form;
 }
Example #2
0
 public function __construct($url = "/auth/login")
 {
     // add form fields
     $form = new formBuilder('login', array('submitURL' => $url, 'successURL' => '/account/index', 'method' => 'POST', 'label' => 'login'));
     $form->addText('username', array('label' => 'User name', 'required' => true));
     $form->addPassword('password', array('label' => 'password', 'required' => true));
     $this->form = $form;
 }
Example #3
0
 public function __construct($url = "/auth/join")
 {
     // add form fields
     //find examples here:
     //http://docs.depage.net/depage-forms/documentation/html/examples.html
     $form = new formBuilder('join', array('submitURL' => $url, 'successURL' => '/account/welcome', 'method' => 'POST', 'label' => 'join'));
     $form->addText('username', array('label' => 'Username', 'required' => true, 'validator' => '/.{6,}/', 'title' => 'at least 3 characters'));
     $form->addEmail('email', array('label' => 'Email address', 'required' => true));
     $form->addPassword('password', array('label' => 'Password', 'id' => 'passinput', 'required' => true, 'autocomplete' => false, 'validator' => '/(?=^.{8,}$)(?=.*\\d)(?=.*[!@#$%^&*]+)(?![.\\n])(?=.*[A-Z])(?=.*[a-z]).*$/'));
     $this->form = $form;
 }