views:

208

answers:

2

I would like to implement an input mask on Magento and that requires the use of the prototype javascript library. Has anyone done this and would you be willing to share?

A: 

Try Really Easy Field Validation. You can use it by applying css classes to your input fields :)

For example:

<form id="some_form">
    <input type="text" name="email" class="validate-email" />
</form>
<script type="text/javascript">
    new Validation('some_form');
</script>
WoLpH
A: 

You could try MaskedInput hosted at Github and see if that does what you need. I needed input masks a while back, so In lack of alternatives I ported digitalBush Masked Input Plugin for jQuery to Prototype.

Bjarte