feature request: javascript realtime validation
3 posts by 2 authors in: Forums > CMS Builder
Last Post: June 28, 2010 (RSS)
By flamerz - June 25, 2010
Hello!
im playing with js.. what do you think about having a class to make some validation:
Check the last example in:.
http://www.i-coding.de/www/en/javascript/form/input-validation.html
"The number field allows only integer, the price field allows only up to two decimal places. The value will be formated when the focus switches to other input. "
[cool]
im playing with js.. what do you think about having a class to make some validation:
Check the last example in:.
http://www.i-coding.de/www/en/javascript/form/input-validation.html
"The number field allows only integer, the price field allows only up to two decimal places. The value will be formated when the focus switches to other input. "
[cool]
Re: [flamerz] feature request: javascript realtime validation
By Djulia - June 26, 2010
Hello,
Here my approach : http://digitalbush.com/projects/masked-input-plugin/
1) in lib/menus/default/edit_fonctions.php (line 174) add : id="$fieldname"
2) download the plugin (in folder plugin) and activate : jsMaskedinput.php
3) download the file jquery.maskedinput-1.2.2.js in the folder 3rdParty/jqueryPlugins/
Use :
add a input text field (name = tel, for example) and add for Field Prefix :
<script language="JavaScript" type="text/javascript">jQuery(function($){ $("#tel").mask("(999) 999-9999");});</script>
You can use different masks...
Thanks for the feedback. :)
Djulia
Here my approach : http://digitalbush.com/projects/masked-input-plugin/
1) in lib/menus/default/edit_fonctions.php (line 174) add : id="$fieldname"
2) download the plugin (in folder plugin) and activate : jsMaskedinput.php
3) download the file jquery.maskedinput-1.2.2.js in the folder 3rdParty/jqueryPlugins/
Use :
add a input text field (name = tel, for example) and add for Field Prefix :
<script language="JavaScript" type="text/javascript">jQuery(function($){ $("#tel").mask("(999) 999-9999");});</script>
You can use different masks...
Thanks for the feedback. :)
Djulia
Re: [Djulia] feature request: javascript realtime validation
By flamerz - June 28, 2010
looks great.
maybe CMSB could have an optional onBlur event and we could call some js code for that field.
maybe CMSB could have an optional onBlur event and we could call some js code for that field.