-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
I have applied masking on phone fields. I am facing one issue.
Suppose you have applied masking on phone for ("(999) 999-9999") format. ZK will prefill the phone field value with masked only if phone field value size is 10. If size of phone field value is less than 10 than in ZK will prefill the phone text box with blank.
I have followed below link.
http://www.zkoss.org/zkdemo/effects/form_effect
I have written below code on my zul file.
<script type="text/javascript" src="/resource/js/jquery.maskedinput-1.2.2.min.js"/> <script type="text/javascript"> zk.afterMount(function() { $.mask.definitions['A']='[A-Z]'; $.mask.definitions['m']='[01]'; $.mask.definitions['d']='[0123]'; $.mask.definitions['y']='[12]'; jq("$phone1").mask("(999) 999-9999"); jq("$phone2").mask("(999) 999-9999"); jq("$phone3").mask("(999) 999-9999"); }); </script>2 | Added Link Tag and code tag |
I have applied masking on phone fields. I am facing one issue.
Suppose you have applied masking on phone for ("(999) 999-9999") format. ZK will prefill the phone field value with masked only if phone field value size is 10. If size of phone field value is less than 10 than in ZK will prefill the phone text box with blank.
I have followed below link.
http://www.zkoss.org/zkdemo/effects/form_effect
I have written below code on my zul file.
<script I have applied masking on phone fields. I am facing one issue.
Suppose you have applied masking on phone for ("(999) 999-9999") format. ZK will prefill the phone field value with masked only if phone field value size is 10. If size of phone field value is less than 10 than in ZK will prefill the phone text box with blank.
I have followed below link.
http://www.zkoss.org/zkdemo/effects/form_effect
I have written below code on my zul file.
<script type="text/javascript"
src="/resource/js/jquery.maskedinput-1.2.2.min.js" />
<script type="text/javascript">
zk.afterMount(function() { $.mask.definitions['A']='[A-Z]';
$.mask.definitions['m']='[01]';
$.mask.definitions['d']='[0123]';
$.mask.definitions['y']='[12]';
jq("$phone1").mask("(999) 999-9999");
jq("$phone2").mask("(999) 999-9999");
jq("$phone3").mask("(999) 999-9999");
});
</script>