Hi,
I want to connect default signup (registration) form to a button.
I DO NOT want to create a custom registration form. I simply want to trigger the default form using a button.
Is there a way to do it?
I would really appreciate if someone could point me in the right direction.
Thanks for taking time to read my query. 
This forum is for code related issues on your site.
For your question you are better off going through Wix Support.
https://support.wix.com/en/article/contacting-wix-support
In the meanwhile, if you just want to use the Wix default, then simply use the Wix Login Bar that you can customise as shown here.
https://support.wix.com/en/site-members/customizing-your-members-area
Well, my question really was code related. There is no direct way to connect button to the form.
I was hoping to find a code to execute on button click event.
export function button1_click(event) {
//what object.method do I call?
}
I couldn’t find anything in the API documentation about the existing signup form.
I can use the login bar as you said, format it like a button, so it reads ‘Sign up’. But if a user is logged in, then their name will be displayed instead, which will mess up the layout and appearance. So, I have to disable the login bar if user is logged in.
And that’s what I’ve been doing, but it’s a really clumsy way to trigger a signup form.

I was hoping to find a simple, elegant function call. Something equivalent to .openLightbox()
wixWindow.openLightbox("LightboxName");
Anyway, thanks for the reply.
Okay, have a look at this tutorial as it helps you create a button that logs the user in and changes the button’s value to Logout, or logs the user out and changes the button’s label back to Login.
https://support.wix.com/en/article/corvid-tutorial-building-your-own-members-area
Otherwise, you will need to look at using promptLogin and you can use it with options so that you can tell it if you want either login or signup to be shown first.
https://www.wix.com/corvid/reference/wix-users.html#promptLogin
It could be something like this.
import wixUsers from 'wix-users';
$w.onReady( function() {
let user = wixUsers.currentUser;
let userId = user.id.id; // "r5cme-6fem-485j-djre-4844c49"
let isLoggedIn = user.loggedIn; // true or false
if (isLoggedIn) { //user is logged in, open lightbox
} else {
wixUsers.promptLogin() //user is not logged in, prompt login screen
.then( (user) => {
let userId = user.id.id; // "r5me-6fem-45jf-djhe-484349"
let isLoggedIn = user.loggedIn; // true
let userRole = user.role; // "member"
return user.getEmail();
} )
.then( (email) => {
let userEmail = email; // "user@something.com""user@something.com"
} )
.catch( (err) => {
let errorMsg = err; // "The user closed the login dialog"
} );
}
Then you can simply change the promptLogin options to something similar to this.
let options = {"mode": "login", "lang": "es"};
wixUsers.promptLogin(options)
Or like this
wixUsers.promptLogin( {"mode": "signup"} )
Or if you want to use it with an export function on a button onClick event handler, then simply try adding the promptLogin code underneath the export function for your button with the mode options designated so that it knows which option to show first.
Hi @givemeawhisky That worked like a charm.
Thank you so much for helping out. Much appreciate it. 
I simply called wixUsers.promptLogin() upon a button click.
Code is below for anyone who wants to achieve similar result.
export function button1_click(event) {
let user = wixUsers.currentUser;
let isLoggedIn = user.loggedIn;
if (isLoggedIn===false) {
wixUsers.promptLogin(); //<--this opens the default form.
}
}
@setyvyas
Your solution worked like a charm!
Amazing
I do not recommend to follow very old posts.
This solution may work —> but the Wix-Users-API is a outdated (depricated one) and you should better switch over to newer one, since one day, this will not work anymore and you will have difficulties.
Do not bump up old posts, better you open your own post with your own individual question. You can connect the post inside of your own one, to explain better what you are looking for.
OLD POSTS CAN LEAD YOU TO WRONG OR AT LEAST OUTDATED SOLUTIONS!