Our blog

 

Zend Dojo Form Input Size + Solution

Problem:
You are dutifully setting your size attribute in your Zend Form class and you input elements are being rendered with that size attribute. However if Javascript is enabled and you are using Dojo for your forms, the size attribute gets dropped.

Solution:
To set the width on dojo form elements you must use the width css operator. eg

PHP:
  1. $form->getElement('blah')->setAttrib('style'=>'width: 50em;');

So simple once you know how!

More...

More Reading:

 

Leave a Reply