javascript - Auto-generated username -


i've been trying search find answer question i'm sure it's been asked dozen or more times, life of me can't find answer.

i've got basic form 2 text fields...firstname, lastname , username field read-only.

i'm looking way populate username dependent on entries in firstname lastname fields. i'm guessing jquery or javascript can done...but said above....having heck of time trying find examples.

any appreciated. thanks.

concatenate 2 inuput values of firtname , lastname inputs:

$('input[name=username]').val($('input[name=firstname]').val()+$('input[name=lastname]').val()).attr('disabled',''); 

Popular posts from this blog