I want to create a textfield element in Zend Form which always type in uppercase whether CapsLock is On or Off.
Thanks
I want to create a textfield element in Zend Form which always type in uppercase whether CapsLock is On or Off.
Thanks
That will have to be client side scripted, if you use Zend_Dojo_Form you can use setUppercase($flag)
or pop you favorite bit of Javascript in.
You can use Zend_Validate to check server side once it has been submitted.
Zend_Form
is a serverside representation of a Standard HTML form. Standard HTML Form have no built-in facility to force uppercase in the client. This would have to be enforced through the use of JavaScript. You have several options:
Zend_Filter_StringToUpper
filter to the element to make all input uppercase when data is passed to the form on the serversideZend_Dojo_Form_Element_TextBox
with setUppercase
set to true