![]() |
Modify value of registration forms at submission
I'm not letting my users choose a username, instead I'm using their email address to create it for them.
I have a simple jscript function that pulls their username from their email address. In that same function, I'm setting the value of the username element in the form. I'm pretty sure the function is running prior to the form being submitted, but upon testing, it tells me I haven't entered a username. I've included my code below: Code:
function createUserName(email) Code:
<input type="submit" class="button" value="$vbphrase[complete_registration]" accesskey="s" onClick=createUserName(email.value) /> Seems I didn't do anything wrong, but when I pulled the username out of the form, I forgot to readd a hidden element, so although my code was working, it couldn't actually set the value of an element that didn't exist. I added the following: Code:
<input type=hidden name="username" /> |
All times are GMT. The time now is 05:00 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|