Creating a log in form which is separate to the sign up form and make it hidden

I am working on a magazine subscription site where people must pay FIRST via a POWr paypal button and then get directed from paypal after successful payment to a url which has a hidden sign up page (should not include the option to log in) which gains you access to a members only page. The point is that you can only access this page once you have paid or unless you know the url.

Once membership is completed and approved by an admin, members can access the members only page where there is only one option - ‘log in’ with a smaller ‘sign up’ button or hyperlink which directs you to the original subscribe page where the paypal button is.

Does this make sense? I don’t know corvid and will need help with this…

Firstly, why do you need to make the paypal button through a Wix app by POWr? You can create your own Paypal button which won’t come with any POWr branding unless you use the paid version.
https://support.wix.com/en/article/connecting-paypal-as-a-payment-provider
https://support.wix.com/en/article/adding-a-paypal-button-280640
https://www.paypal.com/us/smarthelp/article/how-do-i-create-a-paypal-button-using-the-wix-html-widget-ts2001
https://www.wix.com/corvid/forum/community-discussion/solved-custom-paypal-button-help

As for your signup page, well you can easily create your own custom signup lightbox and simply not use the link for the Login lightbox.

So for example, if you went with a similar design to Wix own signup forms, then you can simply just delete the marked area on both pics below which is a basic on the page link which takes you to the Login lightbox.


If you are after a already supplied version for a custom signup and login lightbox, then have a look at Nayeli (Code Queen) tutorials and videos for it here.
https://support.totallycodable.com/en/article/custom-registration-for-site-login-using-wix-code
https://support.totallycodable.com/en/article/create-custom-log-in-sign-on-screen-using-wix-code

With regards to the code, if again you don’t want to be redirected to the Login lightbox after the user Signs up, then simply delete this line of code from the site login code tutorial.

wixWindow.openLightbox("login");
//if you want to move user onto another page after signup is successful, then simply use this...
wixLocation.to("/yourpageURLhere");  //Change the URL ending to whatever page you want to send the user to after they log in. 

The same with the redirection for the Sign On tutorial
You can simply change the wixLocation.to command to go to whatever page you require.

      wixLocation.to("/account/my-account");  //Change the URL ending to whatever page you want to send the user to after they log in. 
 

Obviously you will need to set up manual approval for your signup if you are wanting to manually approve members yourself.
Who can be a member?
Choose who can be a member of your site:

  • Everyone: When a new member signs up, they are approved automatically. You do not need to do anything.

  • People I approve: When a new member signs up, you receive a notification, both by email and in your site’s dashboard, asking if you want to approve or reject them. Only those who you approve become site members.
    Which option shows first?
    Choose which option appears first in the signup window:

  • New member signup: The signup option is displayed first.

  • Existing member login: The login option is displayed first.
    Site Members: Editing Your Member Signup Settings for the Default and Custom Forms | Help Center | Wix.com

You can also see a Wix tutorial here about setting up your own custom signup lightbox.
Velo Tutorial: Creating a Custom Registration Form with Code | Help Center | Wix.com
However, you will need to set your Member signup settings to suit it too.
Velo: Enabling Custom Site Registration | Help Center | Wix.com

Once you have setup manual approval with the Signup lightbox, you can either keep the user on the same page or direct them back to your home page or a awaiting approval page for example.

Then you can simply use Wix Automations to send them a email once they get approved by yourself.
Wix Automations | Help Center | Wix.com

For Members only page you can use this tutorial as an example for a members profile page. It uses dynamic pages so that they are unique to each member and only accessible by that specific user.
Velo Tutorial: Building Your Own Members Area | Help Center | Wix.com

You can change this tutorial to whatever you wish, you don’t have to keep it the same, it is just there as an example of what can be done.

You can add on this Wix Automation email the url address for your Member profile page on which you can have your Login lightbox popup only instead of your Signup lightbox.

So once you approve a member they will receive an email stating that they are now a site member and can access your site etc.

This is cide that I have used for a custom signup lightbox on a site.

import wixUsers from 'wix-users';
import wixWindow from 'wix-window';
import wixLocation from 'wix-location';

$w.onReady(function () {
    
    $w("#registerButton").onClick( (event) => {
        
   let email = $w("#email").value;
   let password = $w("#password").value;
   let first = $w("#firstName").value;
   let last = $w("#lastName").value;

   wixUsers.register(email, password, {
       contactInfo: {
        "firstName": $w('#firstName').value,
        "lastName": $w('#lastName').value,
       }
      } )
      .then( (result) => {
        let resultStatus = result.status;
  wixWindow.lightbox.close();
  wixLocation.to("/sign-in-status");  //Change the URL ending to whatever page you want to send the user to after they log in.
      } );     
    } );
    
});

This works perfectly and closes after registering details before moving user onto sign-up status page, then both names will be saved in contacts and once site member is approved the member details will be added to ‘members’ database.

I have made use of the Wix Member profile tutorial on this site and used it as a starting point for a Members only page, hence the signup lightbox saving the info and then, once member is approved, adding that into the Members dataset which is from the tutorial.

See the Wix API reference for Wix Users for more info about the register and login functions.
https://www.wix.com/corvid/reference/wix-users.html

Wow thank you so much - it does seem like you understand what I have asked for. And this is extremely helpful - Ive been talking to WIX for four days about this and only at the end did the mention Corvid which I know literally nothing about. Is Corvid HTML?

So just to answer your question about the POWr paypal button - the site is set up as an annual subscription service so I have had to upgrade to the business version to enable this. This has all the functionality I need.

The first thing I have learned though is while you can amend the WIX sign up form but you cannot amend the WIX login form. Hence my dilemma so looking at your custom options seem like they would correct my problem.

May I ask - do you work as Corvid Developer? Could you be employed to action this for me? I will take a more in depth look today - but thank you so much for this so far!

Firstly all code in Wix Corvid is Javascript, however you don’t have access to the DOM so that you can’t break anything.

You can add html into your site, however it has to be either through a html iframe on your page or through the use of a new tool in tracking and analytics.
https://support.wix.com/en/article/using-iframes-to-display-visible-content-on-your-site
https://support.wix.com/en/article/embedding-custom-code-to-your-site
https://support.wix.com/en/article/corvid-working-with-the-html-element

With regards to the signup and logins, if you want complete control over them, then do use your own custom lightboxes for them.

No I don’t work as a Corvid Developer, I just use Wix for my own website and for other websites that I do or have done. Unfortunately due to my own time constraints, I can’t help anybody apart from when I am on this forum in my own free time.

However, I do thoroughly suggest that you step back and take a big deep breath and start doing it all yourself. It might sound and look daunting to begin with, however the more you do and the more you learn, the easier it will become for you.

This forum is always here if you are needing questions or have issues about your code and do use the search function in this forum, as you will often find others have already asked the same or similar question before!

Finally, don’t forget to bookmark this forum and the Wix API reference page and the Examples page too.
https://www.wix.com/corvid/reference/
https://www.wix.com/corvid/examples

Thank you so much :slight_smile:

Thank you guy as this is still helpful after 3 years. I have a question @givemeawhisky

What if I use a page I built rather than a lightbox for login(singup)? Would that cause inconsistencies?