feature request: javascript realtime validation

3 posts by 2 authors in: Forums > CMS Builder
Last Post: June 28, 2010   (RSS)

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

Attachments:

jsmaskedinput.php 1K

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.