public function __construct($name = null) { parent::__construct('contact'); $this->add(['name' => 'emailFrom', 'required' => 'true', 'attributes' => ['type' => 'email', 'required' => 'required']]); $this->add(['name' => 'emailSubject', 'required' => 'true', 'attributes' => ['type' => 'text', 'required' => 'required']]); $this->add(['name' => 'emailBody', 'required' => 'true', 'attributes' => ['type' => 'textarea', 'required' => 'required']]); \Common\Form\FormCommon::addClass($this->getElements(), 'class', 'form-control'); }
public function __construct($name = null) { parent::__construct('register'); $this->add(array('name' => 'lastname', 'attributes' => array('required' => 'required', 'type' => 'text'))); $this->add(array('name' => 'firstname', 'attributes' => array('required' => 'required', 'type' => 'text'))); $this->add(array('name' => 'email', 'attributes' => array('required' => 'required', 'type' => 'text'))); $this->add(array('name' => 'phone', 'required' => true, 'attributes' => array('required' => 'required', 'type' => 'text'))); $this->add(array('name' => 'password', 'attributes' => array('required' => 'required', 'type' => 'password'))); $this->add(array('name' => 'confirm_password', 'attributes' => array('required' => 'required', 'type' => 'password'))); \Common\Form\FormCommon::addClass($this->getElements(), 'class', 'form-control'); }
public function __construct($name = null) { parent::__construct('register'); $this->add(array('name' => 'lastname', 'attributes' => array('required' => 'required', 'type' => 'text'))); $this->add(array('name' => 'firstname', 'attributes' => array('required' => 'required', 'type' => 'text'))); $this->add(array('name' => 'email', 'attributes' => array('required' => 'required', 'type' => 'text'))); $this->add(array('name' => 'phone', 'required' => true, 'attributes' => array('required' => 'required', 'type' => 'text'))); $this->add(array('name' => 'password', 'attributes' => array('required' => 'required', 'type' => 'password'))); $this->add(array('name' => 'confirm_password', 'attributes' => array('required' => 'required', 'type' => 'password'))); //pass captcha image options $captcha = new ReCaptcha(array('private_key' => '6LeaH_ISAAAAAHl7oQoATqDW-mgUuhcu5FoM1lYe', 'public_key' => '6LeaH_ISAAAAAAYaTNGVGJYjYxrpAHCNW7Q76avX')); $this->add(array('type' => 'Zend\\Form\\Element\\Captcha', 'name' => 'captcha', 'required' => true, 'options' => array('label' => 'Please verify you are human', 'captcha' => $captcha, 'theme' => 'white'))); \Common\Form\FormCommon::addClass($this->getElements(), 'class', 'form-control'); }