public function __construct($name = 'login') { parent::__construct($name); $this->add(array('name' => 'email', 'type' => 'Email', 'options' => array('label' => 'Email:'))); $this->add(array('name' => 'submit', 'type' => 'Submit', 'attributes' => array('value' => 'Submit'))); $input_filter = new inputFilter(); $input_filter->add(array('name' => 'email', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')))); $this->setInputFilter($input_filter); }
public function __construct($name = 'registration') { parent::__construct($name); $this->add(array('name' => 'password', 'type' => 'Password', 'options' => array('label' => 'Password:'******'name' => 'password_confirm', 'type' => 'Password', 'options' => array('label' => 'Confirm Password:'******'name' => 'password_reset_key', 'type' => 'Hidden')); $this->add(array('name' => 'submit', 'type' => 'Submit', 'attributes' => array('value' => 'Reset Password'))); $input_filter = new inputFilter(); $input_filter->add(array('name' => 'password', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')))); $input_filter->add(array('name' => 'password_confirm', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')))); $this->setInputFilter($input_filter); }
public function __construct($name = 'registration') { parent::__construct($name); $this->add(array('name' => 'username', 'type' => 'Text', 'options' => array('label' => 'Username:'******'name' => 'password', 'type' => 'Password', 'options' => array('label' => 'Password:'******'name' => 'password_confirm', 'type' => 'Password', 'options' => array('label' => 'Confirm Password:'******'name' => 'first_name', 'type' => 'Text', 'options' => array('label' => 'First Name:'))); $this->add(array('name' => 'last_name', 'type' => 'Text', 'options' => array('label' => 'Last Name:'))); $this->add(array('name' => 'phone', 'type' => 'Text', 'options' => array('label' => 'Phone:'))); $this->add(array('name' => 'email', 'type' => 'Email', 'options' => array('label' => 'Email:'))); $this->add(array('name' => 'address', 'type' => 'Text', 'options' => array('label' => 'Address:'))); $this->add(array('name' => 'city', 'type' => 'Text', 'options' => array('label' => 'City:'))); $this->add(array('name' => 'state', 'type' => 'Text', 'options' => array('label' => 'State:'))); $this->add(array('name' => 'zip', 'type' => 'Text', 'options' => array('label' => 'Zip:'))); $this->add(array('name' => 'submit', 'type' => 'Submit', 'attributes' => array('value' => 'Register'))); $input_filter = new inputFilter(); $input_filter->add(array('name' => 'username', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')))); $input_filter->add(array('name' => 'password', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')))); $input_filter->add(array('name' => 'password_confirm', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')))); $input_filter->add(array('name' => 'first_name', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')))); $input_filter->add(array('name' => 'last_name', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')))); $input_filter->add(array('name' => 'phone', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')))); $input_filter->add(array('name' => 'email', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')))); $input_filter->add(array('name' => 'address', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')))); $input_filter->add(array('name' => 'city', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')))); $input_filter->add(array('name' => 'state', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')))); $input_filter->add(array('name' => 'zip', 'required' => true, 'filters' => array(array('name' => 'StripTags'), array('name' => 'StringTrim')))); $this->setInputFilter($input_filter); }