Paid affiliate advertisement

Custom Registration Form

canajun - October 31, 2007 - 22:47

I need a modification to the create account script that will initially show only two text fields.. firstname and lastname. The new user will enter these and click 'continue', which will start the usual registration form, and fill in the username automatically with 'firstname.lastname' -- it would be best if the username field was set to readonly, so the new user couldn't change the generated username.

It is also necessary that the initial two text fields would set the appropriate fields in the profile page, and not appear for registered users.

It would be best if this could be done via themes or modules, and not to core files, so updates would not affect the function.

Javascript? PHP? I'm open to suggestions.

It would be interesting to

rHOnDO - October 31, 2007 - 23:23

It would be interesting to know what the purpose of the site is. Many users would balk at having their username be firstname.lastname instead of something anonymouns ... like 'rHOnDO' ... especially if they didn't realize that it was going to be their username until after they'd entered the information.

rHOnDO

"I used to be open minded, but my brains kept falling out."

It is a closed site, for members of....

canajun - October 31, 2007 - 23:44

an association. There are no anonymous users - registered or not.

Possible in theory

incrn8 - November 3, 2007 - 04:32

This is possible (theoretically) as there is at least one module that inserts itself before the registration page. Take a look at the Role Signup module. If you can hack some PHP, you should be able to modify the code so that it will use the "name" form instead of the role select menu. The only trick is getting those two fields to be put in as the username, but using the $_SESSION variable might work.
______________________________________________________________________________________________________
mybesinformatik.com - Drupal website development

1) add firstname and last

panis - November 3, 2007 - 18:02

1) add firstname and last name to user profile and make them mandatory on registration.
2) use custom module and form-alter hook to hide the "username" field and fill it with a unique but temporary identifier.
Then:
a) you could use some inline javascript to grab the firstname and last from the form and populate the username field automatically before the form gets submitted.
b) Or in your custom module hook_user() reset the username per your needs on an insert or update op.
3) also use your custom module form alter hook to make the username "unmodifiable" on the profile edit form.

I did something similar to force a user to login and create useraccount with their email addresses - you can download the code here:

http://www.hyrme.com/taxonomy/term/8

Module is ready

sign - November 4, 2007 - 17:57

http://sotak.co.uk/custom-registration-form-drupal

__________________________________ ____ ___ __ _ .. .. .
Give a man a fish, and you'll feed him for a day. Teach a man to fish, and he'll buy a funny hat. Talk to a hungry man about fish, and you're a consultant.
- Scott Adams

http://sotak.co.uk

IS this work still open

suro.solutions - November 5, 2007 - 15:54

I can do it in what ever way you want to. This can be done using tpl or by building drupal forms. Contact me via my contact form.

This is closed as you can

sign - November 5, 2007 - 16:04

This is closed as you can see, the module is already used.

I am just currious how will you achieve this functionality with just tpl files?

__________________________________ ____ ___ __ _ .. .. .
Give a man a fish, and you'll feed him for a day. Teach a man to fish, and he'll buy a funny hat. Talk to a hungry man about fish, and you're a consultant.
- Scott Adams

http://sotak.co.uk

Yes, thanks to sign, this

canajun - November 6, 2007 - 04:02

Yes, thanks to sign, this request has been fullfiiled. Good work!

 
 

Drupal is a registered trademark of Dries Buytaert.