Hi,
I am most definitely a nOObie with javascript…here is my issue.
I have a form which has 3 fields:
[list][*]
login
firstname
lastname
Login is a hidden field, firstname and lastname are both text fields
When a user joins I need to join the firstname and lastname together AND replace any spaces with an underscore. So if someone with the firstname of JOHN and lastname of DOE registers I need the value of login to be set to john_doe
No that part is somewhat easy for me to understand how to do, but what if someone has the name of firstname Mary Jane and lastname De Martin how can I replace all of the spaces with underscores AND change the case to all lower? I know there has to be a way to do this with Javascript, but I just don’t know how. Yes I realize not everyone has javascript, but this form is a registration for a PRIVATE site and I am willing to deal with that if it happens.
So to recap I need to join firstname and lastname values, remove all spaces and replace them with underscores, and change the case to all lowercase, and assign the value to login
Thanks in advance,
Chad