[wp-hackers] multi step registration for new users?

Nikola Nikolov nikolov.tmw at gmail.com
Fri Sep 20 12:55:39 UTC 2013

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.

On Fri, Sep 20, 2013 at 3:35 PM, BenderisGreat <greglancaster71 at gmail.com>wrote:

> 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
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list