Skip to content

Instantly share code, notes, and snippets.

@eminetto
Created August 3, 2013 18:05
Show Gist options
  • Select an option

  • Save eminetto/6147379 to your computer and use it in GitHub Desktop.

Select an option

Save eminetto/6147379 to your computer and use it in GitHub Desktop.
<?php
namespace Aluno\Form;
use Zend\Form\Form;
class AlunoForm extends Form
{
public function __construct($name = null)
{
parent::__construct('aluno');
$this->setAttribute('method', 'post');
$this->add(array(
'name' => 'matricula',
'attributes' => array(
'type' => 'hidden',
),
));
$this->add(array(
'name' => 'nome',
'attributes' => array(
'type' => 'text',
),
'options' => array(
'label' => 'Nome',
),
));
$this->add(array(
'name' => 'submit',
'attributes' => array(
'type' => 'submit',
'value' => 'Gravar',
'id' => 'submitbutton',
),
));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment