[wp-hackers] multi step registration for new users?
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
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
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
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
> 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
> walk through.
> Fill out username, email, and how they heard about the site. click next
> 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
> Any tutorials or examples anyone can refer me to?
> View this message in context:
> Sent from the Wordpress Hackers mailing list archive at Nabble.com.
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers