-2

How to handle the lengh of a form input in ZEND framework?

I would like to have a max of 4 characters in my zend form element

Brian Webster
  • 30,033
  • 48
  • 152
  • 225
Mamadou
  • 2,177
  • 5
  • 31
  • 43

1 Answers1

1

Possible duplicate Try this for size :

$element = new Zend_Form_Element_Text('test')
$element->setAttrib('size', '4');

You may want to have a look at the ZF "Creating Form Elements Using Zend_Form_Element" documentation too : link

Community
  • 1
  • 1
piddl0r
  • 2,431
  • 2
  • 23
  • 35