Discussion:
multi step registration for new users?
BenderisGreat
2013-09-20 12:35:25 UTC
Permalink
I know some of you will recommend a plugin like gravity forms, but I want to
code this myself. Custom registration page is simple, but how would I go
about coding a three step registration process. I have several custom
usermeta fields applicable for all users. Rather than have them register,
and then fill it all out on their own I would love to have a custom designed
walk through.

Fill out username, email, and how they heard about the site. click next and
another few selections and text boxes can be filled. The data would be
populating the usermeta boxes - but what is the best way to accomplish this?
Any tutorials or examples anyone can refer me to?





--
View this message in context: http://wordpress-hackers.1065353.n5.nabble.com/multi-step-registration-for-new-users-tp42347.html
Sent from the Wordpress Hackers mailing list archive at Nabble.com.
Eric Hendrix
2013-09-20 12:55:20 UTC
Permalink
Gravity Forma. Ha!




Seriously though you'll need to code a per user cookie, or store a temp variable - conditional paging, etc. Look at an expansion of the WP user registration page. 


Sent from Mailbox for iPhone
Post by BenderisGreat
I know some of you will recommend a plugin like gravity forms, but I want to
code this myself. Custom registration page is simple, but how would I go
about coding a three step registration process. I have several custom
usermeta fields applicable for all users. Rather than have them register,
and then fill it all out on their own I would love to have a custom designed
walk through.
Fill out username, email, and how they heard about the site. click next and
another few selections and text boxes can be filled. The data would be
populating the usermeta boxes - but what is the best way to accomplish this?
Any tutorials or examples anyone can refer me to?
--
View this message in context: http://wordpress-hackers.1065353.n5.nabble.com/multi-step-registration-for-new-users-tp42347.html
Sent from the Wordpress Hackers mailing list archive at Nabble.com.
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Nikola Nikolov
2013-09-20 12:55:39 UTC
Permalink
I would recommend two options(depending on how you want to accomplish the
three-step process):

1) Use JavaScript(jQuery for instance would make things easier to
accomplish) in order to show/hide the next/previous step - this way the
user won't have to reload the page to go the next step and it will all be
there. You can make AJAX requests to your PHP script in order to check
whether the email is available, if it's correct or not, etc(you can do
simple validation with JavaScript as well, but you'll need AJAX in order to
see if this email has already been used or not). Once all steps have been
finished, simply submit the form(with AJAX or not - it's up to you) and let
your PHP script handle the registration and updating of user meta.
If you want your users to stay in the same page and simply fill-out the
required form fields - that's the way to go in my opinion.

2) Use PHP sessions. Upon submitting the first form, store the user's data
within a session variable - this data is only available to your PHP script
and can't be modified(if you use cookies or $_GET parameters instead for
instance). You can do validation once each step is submitted and force the
user to stay on the same step if there are any errors while validating the
data. After each step, simply update the session variable with the newly
added data and once all steps are completed, use that session variable for
the user registration and population of custom user fields.


I would generally go with the first step, but you can choose whichever
you're most comfortable with.
Post by BenderisGreat
I know some of you will recommend a plugin like gravity forms, but I want to
code this myself. Custom registration page is simple, but how would I go
about coding a three step registration process. I have several custom
usermeta fields applicable for all users. Rather than have them register,
and then fill it all out on their own I would love to have a custom designed
walk through.
Fill out username, email, and how they heard about the site. click next and
another few selections and text boxes can be filled. The data would be
populating the usermeta boxes - but what is the best way to accomplish this?
Any tutorials or examples anyone can refer me to?
--
http://wordpress-hackers.1065353.n5.nabble.com/multi-step-registration-for-new-users-tp42347.html
Sent from the Wordpress Hackers mailing list archive at Nabble.com.
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
BenderisGreat
2013-09-20 20:41:23 UTC
Permalink
so I would design a custom wordpress registration page with all the fields i
need, and then use something like js tabs to control whats visible ? that
could work.



--
View this message in context: http://wordpress-hackers.1065353.n5.nabble.com/multi-step-registration-for-new-users-tp42347p42356.html
Sent from the Wordpress Hackers mailing list archive at Nabble.com.
J.D. Grimes
2013-09-20 20:45:55 UTC
Permalink
Post by BenderisGreat
so I would design a custom wordpress registration page with all the fields i
need, and then use something like js tabs to control whats visible ? that
could work.
Yes, that's what I would suggest also.
Eric Hendrix
2013-09-20 21:05:57 UTC
Permalink
That's definitely the most efficient route - Nikola's always got great
advice!
Post by BenderisGreat
Post by BenderisGreat
so I would design a custom wordpress registration page with all the
fields i
Post by BenderisGreat
need, and then use something like js tabs to control whats visible ?
that
Post by BenderisGreat
could work.
Yes, that's what I would suggest also.
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
--
*Eric A. Hendrix*
***@gmail.com
(910) 644-8940

*"Non Timebo Mala"*
ChrisHe
2013-09-21 16:20:36 UTC
Permalink
IF you don't want to code this yourself, I would suggest looking at plugin
WP-Members - the allows addition of custom fields etc. and is quite
flexible. Offers a few other things, such as ability to block page(s) and/or
post(s) if user is not logged in.
Chris



--
View this message in context: http://wordpress-hackers.1065353.n5.nabble.com/multi-step-registration-for-new-users-tp42347p42368.html
Sent from the Wordpress Hackers mailing list archive at Nabble.com.
Loading...