Skip to content

Instantly share code, notes, and snippets.

@eminetto
Created May 23, 2011 19:31
Show Gist options
  • Save eminetto/987374 to your computer and use it in GitHub Desktop.
Save eminetto/987374 to your computer and use it in GitHub Desktop.
ProfessorForm
<?php
class ProfessorForm extends PessoaForm {
    public function __construct($options = null) {
        parent::__construct($options);
        $this->generate();
    }
   
    private function generate() {
        $disciplina = new Zend_Form_Element_Text('disciplina');
        $disciplina->setLabel('Disciplina')->setRequired(true)->addFilter('StripTags')->addValidator('NotEmpty');
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel('Entrar');
        $submit->setAttrib('id', 'Entrar');
        $this->addElements(array($disciplina,$submit));
        //action e method
        $this->setAction(BASE_URL.'/professor/index')->setMethod('post');
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment