public function createService(ServiceLocatorInterface $serviceLocator)
 {
     $form = new Form();
     $form->setName('login-form');
     $form->add(array('type' => 'hidden', 'name' => 'ref'));
     $fieldset = new Fieldset();
     $fieldset->add(array('name' => 'login', 'options' => array('label' => 'Login name', 'description' => 'Provide your login key (e.g. email adress)')));
     $fieldset->add(array('type' => 'password', 'name' => 'credential', 'options' => array('label' => 'Password')));
     $form->add($fieldset);
     $form->add($this->forms->get('DefaultButtonsFieldset'));
 }
Example #2
0
 public function setUp()
 {
     $fs = new Fieldset('test', ['type' => "text"]);
     $fs->setAttribute('class', 'myclass1 myclass2');
     $fs->setName('myField');
     $target = new Form();
     $target->add($fs);
     $this->target = $target;
 }