Jump to content

Question

12 answers to this question

Recommended Posts

  • 0
Posted

How do we force the registration form to use email for username?

 

You need to edit a template, there's a thread somewhere on forum, I looked in support and can't find it and I can't find it on Google :( Hopefully the user will look here I think it was Daniel.

  • 0
Posted

Actually I'm curious if Tyson or Cody has a slightly cleaner method.  Daniel's method just removes the option to select Usernames which works perfectly but I want the radio button gone completely if possible.  Is there a simple code edit that I can make to accomplish this?

  • 0
Posted

Actually I'm curious if Tyson or Cody has a slightly cleaner method.  Daniel's method just removes the option to select Usernames which works perfectly but I want the radio button gone completely if possible.  Is there a simple code edit that I can make to accomplish this?

 

Not tried this so not sure:

 

remove the PHP code replace it with:

<input type="hidden" value="<?php $vars->username_type, "email") == "email"), array("id"=>"username_type_email"); ?>" id="username_type" name="email">
  • 0
Posted

 

Not tried this so not sure:

 

remove the PHP code replace it with:

<input type="hidden" value="<?php $vars->username_type, "email") == "email"), array("id"=>"username_type_email"); ?>" id="username_type" name="email">

 

It just breaks it and returns a blank page.  In the meantime I just did a "display: none;" in the <li> so that'll at least accomplish what I want aesthetically.

  • 0
Posted

CubicWebs' solution has a number of syntax errors, which is why the page failed to load.

 

IIRC, using the email address as the username is the default behavior, so I would think you could simply remove the <li> and the radio buttons altogether, but I haven't tested this.

  • 0
Posted

CubicWebs' solution has a number of syntax errors, which is why the page failed to load.

 

IIRC, using the email address as the username is the default behavior, so I would think you could simply remove the <li> and the radio buttons altogether, but I haven't tested this.

 

If you remove the radio buttons the username text field is displayed.  If you remove it as well and submit your client registration it will give you an error saying you need to specify a username.  The way I have it set now works fine.  I guessing the ability to select a default (as in not letting client have the choice) is going to be a built in function in the future so what I have now is fine.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...