Custom Signup Form Will not allow users to sign in

Why can’t my users sign in using their chosen passwords after signing up on our custom form. The information goes to the proper database and i am notified of the sign up. It just does not allow them to sign in. www.metrepairs.com give it a try


You are using a DATASET as i can see.

Did you use some code?

Your FORM is a CUSTOM generated one, or a Wix-Form ?

Did you use code to generate your Reg/Login ?

BAD EXPERIENCE on your REGISTRATION-FORM!

  1. Not mentioned the rules for PW-GENERATION for example.
    Which are the rules for password?
    -How many characters are required?
    -Which Characters are allowed?
    -And so on.

  2. Form needs a lot of DATA → this will make your users turn around and leave your page immediately.

Instead of trying to overload the user with to many questions, at first step get only the most needed important user-data for registration and collect rest of data when user has registered (after REGISTRATION flow).

  1. Surely more open points…

First of all, it is bad practice to store passwords for anyone.

If you code a custom registration to create a new member account correctly then Wix handles:

  • All the encryption
  • All the security
  • All the password reset requests

The members login doesn’t work because no one actually signed up. They simply filled a form that you created that is linked to a custom database. If you want the member to login via the native Wix login function then their credentials need to be actually stored on the Wix system. Wix is not going to read your database for credentials.

https://www.wix.com/velo/reference/wix-members-frontend/authentication/register

Thanks for the pointers I will consider that and look into the adjustments. I used partial code. Its a custom made wix form. I did notice issues with the password validations

“First of all” Not tasteful start but thanks for your input We are not looking to store passwords no way!

I used code for the Interest selections to start building a algorithm (Idea) Nothing more. What would be your complete suggestion for this type of setup instead of the standalone form? I have already started mapping out a new registration flow and UI.

$w.onReady(function () {
$w(“#submitButton”).onClick(() => {
const password = $w(“#userPassword”).value;

    // Clear previous error messages
    $w("#passwordError").text = "Please check your input";

    if (!validatePassword(password)) {
        // Display error message directly, as we cannot use event.preventDefault() in this context
        console.log("Password does not meet the requirements.");
        $w("#passwordError").text = "Password does not meet the requirements.";
        
        // Optionally, you can return from the function here to ensure no further code is executed
        return; // This effectively "prevents" the form from being submitted by not executing any further code
    }

    // If password validation passes, continue with form submission or additional validation
    console.log("Password is valid.");
    // Proceed to collect other form data and potentially submit it or perform additional actions

    // Example: Collecting other form data and submitting
    const formData = {
        // Collect other form data here
    };

    // Perform submission or additional actions only if all validations pass
    submitFormData(formData); // Make sure to define a function that handles your form submission
});

});

// Define your function to validate the password
function validatePassword(password) {
const regex = /^(?=.[a-zA-Z])(?=.\d).{6,20}$/;
return regex.test(password);
}

// Example submission function (you need to implement it based on your requirements)
function submitFormData(formData) {
// Implement form data submission logic here, e.g., inserting into a database
console.log(“Submitting form data:”, formData);
// Use wixData.insert() or other methods as needed
}

Oh hun, that’s not how i meant that. I was only just preparing to write my feedback in an orderly fashion. A list of thoughts.

I’m not like @CODE-NINJA that gets over the top passionate about his responses and writes in all caps and bold letters with extra question marks and exclamation points. Right, @CODE-NINJA ?

But going back to why the login is not working, it comes down to the fact it’s just not coded. You could use the Wix pre-made custom registration form and tweak it a bit or continue to custom code the entire form.

The coding gets more complicated if you try to collect data at the same time. It’s completely doable and people do it all the time —— it’s just complicated.

Easy way forward is to use the Wix registration “code” form to customize the design, and collect the rest of the questions inside of the Members profile area after they are registered (because now Wix allows you to add extra questions to the native profile function).

Also, you do not have to manually code the Regex validation pattern. If you really want to have a custom validation pattern then you can click on the password input element, scroll down the settings and toggle on validation. The regex code can be pasted there.

What you WOULD need to code is if you want to ask the visitor to type in their password twice to see if they both match. (But in reality you don’t really need this functionality. If they forget or misspell their password then Wix emails them to reset it after they click on the forgot password link on the login screen.)

1 Like

Hello together.

Yes what Queeny said is right, it is better not to create own database with passwords and trying to generate some kind of an own login-system. Better is to use the already given options by wix.

But Queeny and me we have some kind different views.
I like more to go most possible CODING-WAY (oh sorry my CAPS again) :grinning: .
Queen likes more to use as most as possible the given options provided by wix.

Both ways works → but it’s a question of flexibility. The more own coding you will implement into your site (CUSTOM-MODE) → the more flexible will be your site.

To say it in short —> Comparisson between → MAINSTREAM ← and → INDIVIDUALITY.

So maybe the best option is to find a mix of both. In your case it would be the best option.

You can install the Wix-Members-APP on your wix-site, which will give you even some more usefull options regarding the login and everything what is connected to it.

In my past i have done a lot of testing with the login and created also an own CUSTOM one.

You can search for those post for example searching for → “login + russian”, normaly you should get immediately some results like…

  1. Multiple Login light box forms - #2 by russian-dima
  2. Get User By Role - #12 by russian-dima
  3. and so on…

Normaly you need just to find one of my posts about login, because those are mostly all connected to each other. You can collect a lot about LOGIN in those posts.

But such own created LOGIN goes beyond every ordinary login.

You also can find much more simple ones using the search.

2 Likes

Thank you a ton I will dig into those suggestions. I may have mixed a bit in developing my idea but most of my focus on code is in building the profile matching algorithm. So yea thanks again for the Regex suggestion it actually gave me a problem for a bit. Im not to picky about the actually login process being custom as long as I can allow smooth logins and collect the information needed for their profiles. Thanks guys

Also Im now wondering by doing it the suggested way and letting users Signup in a simple process more basic and then allow collection of the data (User Selected Profile Interests) for the algorithm or feature im looking to create. Before I tied the Interest Fields to data sets to collect the selections. I noticed in the member section On the account page I can add the fields but what would my process look like to create the results im looking for Allowing Profile matching?

So you can still retrieve that data and “do something” with it.

The difference is where the data will be stored. Wix member database vs your own custom database.

Basically you CAN use the premade profile section and customize it OR do your own profile section and have the data live in yur database:

There is no right or wrong way to do something if the end result gives you the solution you need. We are simply offering different options that have “less code” and “more code”. It’s whatever you feel comfortable doing.

The main thing is making sure the user experience is smooth, not confusing and intuitive so they have a great experience!

1 Like