westdc-zf1/application/models/MaillistForm.php

25 lines
696 B
PHP
Raw Normal View History

2009-03-06 03:20:46 +00:00
<?php
class MaillistForm extends Zend_Form
{
public function __construct($options = null)
{
parent::__construct($options);
$this->setName('maillist');
$email = new Zend_Form_Element_Text('email');
$email->setRequired(true)
->addFilter('StringTrim')
->addValidator('NotEmpty')->addValidator('EmailAddress');
$id = new Zend_Form_Element_Hidden('id');
$redirect=new Zend_Form_Element_Hidden('redirect');
$submit = new Zend_Form_Element_Submit('submit');
$submit->setLabel('订阅');
$submit->setAttrib('id', 'submitbutton');
$this->addElements(array($id, $email, $submit));
}
}