Details
Description
There is a minor problem with the decorator in Zend_Dojo_Form_Decorator_DijitElement:
Some Dijit form elements - like the number spinner - need an explicit "required=false" in order to accept blank values. This might be necessary if an input is optional and the user enters the input box but decides to exit it without entering a value. Therefore, the value is still empty but e.g. the number spinner validates and rejects the blank value.
If one sets "required=false" this problem does not exist.
The abovementioned decorator already sets required to true if explicitly set, but does not do so for false. Therefore, we need to change this behaviour in order to get the desired behaviour.
Careful: The decorator needs to set the value "false" as a String, not a boolean one. If set to boolean, it will be evaluated to 0 or "" (empty string) which will not be recognized by dojo.
I will attach my modified file. Please let me know whether this bug will be addressed in one of the next patches.
The numberspinner issue is a Dojo issue see http://trac.dojotoolkit.org/ticket/9643. Will be fixed in 1.4