westdc-zf1/application/models/MaillistForm.php

25 lines
696 B
PHP
Executable File

<?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));
}
}