More Maskededit Fun

Seems that ‘CMaskedTextField’ also does not play well with Mobile browsers. I have a Postal code field that can’t be entered while on most Android and iPhones.

The only thing that seems to make it work is to force the placeholder to and empty character with -


				$this->widget('CMaskedTextField', array(

									'model' => $model,

									'attribute' => 'int_plz',

									'mask' => '99999-999',

									'charMap' => array('9' =>'[0-9]'),

									'placeholder' => '',  // makes the field editiable on mobile, but gets the odd moving '-'

								));	



Which does make it work but the digit sep ‘-’ in the mask moves along as you type which is a bit odd.

Heads up if using the masked fields they have a few gotcha’s

Sandy

More Masked Edit Problems -

It seems possible for the Masked Edit field to bypass validation!

If you have a masked edit field and you have not yet filled it in AND you hit ENTER to submit the form it will bypass any validation it seems.

Masked edit seems to have more then a few bugs that make them problematic to use…

Sandy