How to always direct users to a form after wix sign up

Hi,

Using the standard wix registration form, I’m guessing it is possible to direct users to a page where I can collect additional information (by adding membership permisions to that page) but if I have another page that is Members Only, how can I ensure that the user is redirected to the page to complete sign up, without being able to view the other Members Only page first?

For clarification, here is my scenario…

I have a page that retireves information from a database and this should only be viewable by members (it is not member specific but users must be logged in to be able to view it). In order to become a member it is a requirement that a Company Name and Job Title are provided (along with Name, Email Address and Password). Therefore, whenever someone wants to sign up they must provide the additional details before being approved. I’m struggling to understand how I can do this because if I set the page (that is to be viewed by members) as Members Only, after sign up it will direct them straight to that page without asking for the additional information.

I’d be really grateful if someone could help me out or point me in the right direction!

Thanks,
Rachel

hi Rachel,

In the future wix code will feature a custom sign up page. which will enable you to add these extra fields to the site-wide sign up page. Thus making sure that the information is filled before they have access.

Until this feature is released, you will need to disable the member only pages and create your own validations for these pages.
By validations I mean create a (backend) function that will get the email, query a ‘members’ collection for the email of the logged in user, then return whether or not the user has filled these additional fields or not, and either display the page or redirect the user to the extra details form.

Use wixUsers to get the email of the currently logged in user
http://www.wix.com/code/reference/wix-users.html

Use wixData.query to query the ‘member’ collection.

If you have yet to create such a collection, refer to this article

Use wixLocation to navigate to other pages.

Thank you for your response! I understand what you have said but the problem is I don’t want to approve a member before I have additional details from them! Therefore they won’t be able to login for me to request additional information. Is there any way of getting around this?

Hi !

Did you find some ways to d o it?

If the page that has the form asking for additional details is set to Members Only, then ofcourse the members will not be able to view it until they are approved by the admin. And if you cannot approve them without fetching these additional details, then you will have to check the member’s current status (i.e. PENDING or APPROVED) using Velo.

https://dev.wix.com/docs/velo/api-reference/wix-members-frontend/current-member/get-member