About Wix's sign up form

Hello! I was wondering if it’s possible to add in custom fields to the sign up form created by Wix…I’ve read an article about this, but I don’t think it applies to this particular form, because I’ve tried following it, but the form still has the same 2 fields: email and password.

Any help would be appreciated
Thanks!

EDIT: Found another article , still doesn’t really help…

You can’t add it to the default Wix Sign Up Window.

However, you can do it yourself with your own custom lightbox sign up where you can add whatever user input you want for your user to enter at signup.

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.
      } );     
    } );
    
});

Thanks! That worked for me beautifully. Can you explain why I’d need resultStatus though? Did you put it there in case I’ll have a need to use it? Or is it something that I have to do so the code works? If it’s the 2nd case, what is it?