How to create a input Mask with jQuery in RSForms? I have try all documentation from RSJoomla without success:


My question is in "Input Mask" no "Validation field"


SOLVED for all Forms!!!

  1. Create file like /includes/jquery.maskedinput.js
  2. Copy and paste this code from https://raw.githubusercontent.com/digitalBush/jquery.maskedinput/1.4.1/dist/jquery.maskedinput.js
  3. Propably you have a jQuery library running in your Joomla;
  4. Add in index.php after tag body;
src="includes/js/jquery.maskedinput.js" type="text/javascript">

$("#telefone").mask("(99) 9999-9999?9",{placeholder:" "}); //Where #telefone = #ID Name form label
$("#celular").mask("(99) 9999-9999?9",{placeholder:" "}); //Where #celular = #ID Name form label
  1. Now, all your forms with elements "#telefone" and "#celular" will be masked!

You can see complete documentation for this jQuery Masked Input in: http://digitalbush.com/projects/masked-input-plugin/

If you dont want edit your index.php file you can add this code in each form you need Masked:

Components >> RSForm >> Edit your form >>

Tab Proporties >> Tab Script >>

Paste in Java Script field without "---". I put this --- for simple copy and paste for others users.

<---script src="includes/js/jquery.maskedinput.js" type="text/javascript"><---/script>


   $("#telefone").mask("(99) 9999-9999?9",{placeholder:" "}); //Where #telefone = #ID Name form label
   $("#celular").mask("(99) 9999-9999?9",{placeholder:" "});
   $("#phone_1_field").mask("(99) 9999-9999?9",{placeholder:" "});
   $("#phone_2_field").mask("(99) 9999-9999?9",{placeholder:" "});
   $("#fax_field").mask("(99) 9999-9999?9",{placeholder:" "});
   $("#zip_field").mask("99999-999",{placeholder:" "});

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.