This is post is now quite old and the the information it contains may be out of date or innacurate.

If you find any errors or have any suggestions to update the information please let us know or create a pull request on GitHub

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

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

So simple once you know how!