Skip to content

Instantly share code, notes, and snippets.

@eminetto
Created November 4, 2012 14:00
Show Gist options
  • Save eminetto/4012044 to your computer and use it in GitHub Desktop.
Save eminetto/4012044 to your computer and use it in GitHub Desktop.
<?php
namespace Admin\Form;
use Zend\Form\Form;
class Login extends Form
{
public function __construct()
{
parent::__construct('login');
$this->setAttribute('method', 'post');
$this->setAttribute('action', '/admin/auth/login');
$this->add(array(
'name' => 'username',
'attributes' => array(
'type' => 'text',
),
'options' => array(
'label' => 'Username',
),
));
$this->add(array(
'name' => 'password',
'attributes' => array(
'type' => 'password',
),
'options' => array(
'label' => 'Password',
),
));
$this->add(array(
'name' => 'submit',
'attributes' => array(
'type' => 'submit',
'value' => 'Entrar',
'id' => 'submitbutton',
),
));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment