how to disable special characters text field in sugarcrm? -


can me in issue.

i want avoid special characters(!@#$%^&*()) in text field.

actually have added javascript code this. cant enter spl characters. it's working perfect. problem is, data not going inserted after submitted.

<script language="javascript" type="text/javascript">  function alpha(e) {     var k;     document.all ? k = e.keycode : k = e.which;     return ((k > 64 && k < 91) || (k > 96 && k < 123) || k == 8 || k == 32 || (k >= 48 && k <= 57)); }       </script>  'customcode' => '<input type="text" onkeypress="return alpha(event)">', 

you have missed name of textfield in customcode. customcode should like:

'customcode' => '< input type="text" onkeypress="return alpha(event)" name="your-textbox-name">',


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -