Im asking alot of questions today, sorry. Trying to use this. http://digitalbush.com/projects/masked-input-plugin It is an awesome plugin by the way!
I have one field called creditcard (guess what goes in there) And another select called credtcardType (amex, visa, mc, discover) I want to put in the spaces like this 9999 9999 9999 9999. But for Amex I want 9999 999999 99999. Ultimately, I want to submit to the server without spaces. (Maybe a hidden form field) How should I achieve this? Posibility #1: Have different fields for each credit card type and show/hide them based on the ccType select. Possibility #2: onChange of the select, change the class of the input and then re-apply the mask with an if statement which reads the class and applies the correct mask. Totally unsure how to do this. Possibility #3: Pray Any help is greatly appreciated. Glen