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.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...