Can jQuery dynamically change a "username" field based on a "name" field?
- by SoulieBaby
Hi all, basically I have two input fields, "name" and "username".
The idea is that the "username" field will change depending on what is entered into the "name" field - dynamically. I also need the username field to be in lowercase only and to change spaces into dashes. I was thinking using onkeydown but I couldn't get it to do anything.
I've been looking around, but can't seem to find what I'm looking for. Anyone got any ideas?
<input type="text" name="name" id="name" class="field" />
<input type="text" name="username" id="username" class="field" />
^^ basic form inputs.