westdc-zf1/application/models/ReferenceForm.php

29 lines
930 B
PHP

<?php
class ReferenceForm extends Zend_Form
{
public function __construct($options = null)
{
parent::__construct($options);
$this->setName('Reference');
$uuid = new Zend_Form_Element_Text('uuid');
$uuid->setLabel('UUID')->setRequired(true)->addValidator('NotEmpty')
->addFilter('StripTags') ->addFilter('StringTrim');
$reference=new Zend_Form_Element_Text('reference');
$reference->setLabel('文献')
->setRequired(true)
->addFilter('StringTrim')
->addValidator('NotEmpty');
$link=new Zend_Form_Element_Text('link');
$link->setLabel('URL(optional)')
->addFilter('StringTrim');
$submit = new Zend_Form_Element_Submit('submit');
$submit->setAttrib('id', 'submitbutton')->setLabel('发送');
$this->addElements(array($uuid,$reference,$link,$submit));
}
}