0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
SignupForm.php
Go to the documentation of this file.
1 <?
23 class SignupForm extends Zend_Form
24 {
25  public function init() {
26  $username = $this->addElement('text', 'username', array(
27  'filters' => array('StringTrim', 'StringToLower'),
28  'validators' => array(
29  'Alnum',
30  array('StringLength', false, array(3, 20)),
31  ),
32  'required' => true,
33  'label' => 'Your username:',
34  ));
35 
36  $signup = $this->addElement('submit', 'signup', array(
37  'required' => false,
38  'ignore' => true,
39  'label' => 'Sign up',
40  ));
41 
42  // We want to display a 'failed authentication' message if necessary;
43  // we'll do that with the form 'description', so we need to add that
44  // decorator.
45  $this->setDecorators(array(
46  'FormElements',
47  array('HtmlTag', array('tag' => 'dl', 'class' => 'zend_form')),
48  array('Description', array('placement' => 'prepend')),
49  'Form'
50  ));
51  }
52 }
53 
54 ?>
55 
Copyright (C) 2007-2015 Hypertable, Inc.
Definition: SignupForm.php:23