0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
SendForm.php
Go to the documentation of this file.
1 <?
24 class SendForm extends Zend_Form
25 {
26  public function init() {
27  $username = $this->addElement('textarea', 'message', array(
28  'validators' => array(
29  array('StringLength', false, array(1, 160)),
30  ),
31  'required' => true,
32  'rows' => 5,
33  'cols' => 105,
34  'label' => 'Your message (max 160 characters):',
35  ));
36 
37  $send = $this->addElement('submit', 'send', array(
38  'required' => false,
39  'ignore' => true,
40  'label' => 'Send',
41  ));
42 
43  $hidden = $this->addElement('hidden', 'goto', array(
44  'value' => $this->_attribs['goto'],
45  ));
46 
47  // We want to display a 'failed to send' message if necessary;
48  // we'll do that with the form 'description', so we need to add that
49  // decorator.
50  $this->setDecorators(array(
51  'FormElements',
52  array('HtmlTag', array('tag' => 'dl', 'class' => 'zend_form')),
53  array('Description', array('placement' => 'prepend')),
54  'Form'
55  ));
56  }
57 }
58 
59 ?>
60 
Copyright (C) 2007-2015 Hypertable, Inc.
Definition: SendForm.php:24