Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Setting the Username as standard

Quote Reply
Setting the Username as standard
Hi,

while signup, how can I set the username like the email adress, so that my visitors doesnt have to parameters to fill. I thought of a valee in the globlas like

if (signup_user) {
$Username = $Email;
}

but that doesnt work.

Christian
Quote Reply
Re: [cwschroeder] Setting the Username as standard In reply to
Use Javascript. Make the username field hidden, and then format the email field as such



<input type=text name=Email onChange="document.forms.usersignuporwhatever.username.value = this.value;">



HTH
Quote Reply
Re: [ISIS] Setting the Username as standard In reply to
Hi!

Could you explain it a little bit more! Blush

Thanks
Quote Reply
Re: [Payooo] Setting the Username as standard In reply to
Basically, what I am advocating is a client-side solution. Rather than messing about with the backend, we just copy the contents of the Email box on the signup page on to the Username box, whilst keeping the Username box hidden, so that rather than filling in two boxes, they are filling in one box, and the contents of the filled in box are replicated so that both fields now store the Email address.

Capiche?
Quote Reply
Re: [TLA] Setting the Username as standard In reply to
Thanks TLA!

I understand what you want to do, but my problem is: I don't know how! Blush

Can you explain how to do this (step-by-step). Angelic

Please make one (real) example.
Quote Reply
Re: [Payooo] Setting the Username as standard In reply to
THIS IS the User Signup Form:

<table cellpadding="5"><tr><td>
<form name=TLA action="ur.site" method="POST">

<br><font face="Arial,Helvetica" size=2 color="black">To register, please fill out this form completely. A valid email address is required.</font><br><br>

<table border ="0" cellspacing="4" cellpadding="0">
<!--<tr><td align="right" valign="top"><font face="Arial,Helvetica" size=2 color="black">Username:</font></td>
<td>--><input class="button" type=hidden name="Username" value="" size="30"><!--</td></tr>-->
<tr><td align="right" valign="top"><font face="Arial,Helvetica" size=2 color="black">Password:</font></td>
<td><input class="button" name="Password" size="30" value=""></td></tr>
<tr><td align="right" valign="top"><font face="Arial,Helvetica" size=2 color="black">Email:</font></td>
<td><input class="button" name="Email" size="30" value=""></td></tr>
<tr><td></td><td><br><font face="Arial,Helvetica" size=2 color="black">
<input onClick="document.forms.TLA.Username.value = document.forms.TLA.Email.value;" class="button" type="SUBMIT" name="signup_user" value="Signup"></font></td></tr>
</table>
</form>
</table>



HTH,
AML,
TLA.

Last edited by:

TLA: Jul 23, 2002, 1:32 AM
Quote Reply
Re: [TLA] Setting the Username as standard In reply to
Thanks TLA!

Working great! Wink

I am using it to backup user's First-Signup-Email ...

Is there a way to add more fields to backup?

Or maybe there is some other way to do that?

Last edited by:

Payooo: Jul 23, 2002, 5:06 AM
Quote Reply
Re: [Payooo] Setting the Username as standard In reply to
If you mean add a new field to a database, then go to Database > Links > Properties > Add Field

If you mean a new option on the form, the Build > Edit Templates > Add.html or include_form.txt or form.txt (whatever is in add.html)



You probably need both.
Quote Reply
Re: [TLA] Setting the Username as standard In reply to
I'll try to explain this better.

When user signup I would like to backup some info they provide.

(because they have an option to change their info)

So, I'm using this code to insert/backup/copy their e-mail to a new field called Signup_Email

(if they change it later I would like to know e-mail they used to signup)

But with this method I can store only one field ...

Is there a way to store/backup all info (like real name, address...)?