I have a custom signup form setup so that members have to provide information before being registered, and I want to add a “Confirm Password” option along with the Password input. What’s the best way to set that up?
I’ve looked at other threads and none of the suggested code worked.
I have code set up that registers them as a member, but I’m not sure how/where to add any confirm password code.
Any help is appreciated!
Here’s the code I have already for the page:
import wixUsers from 'wix-users';
$w.onReady(function () {
$w('#submitButton').onClick(() => {
let emails = [];
let labels = [];
emails.push($w('#email1').value);
// register as member using form data
wixUsers.register($w('#email1').value, $w('#password').value, {
"contactInfo": {
"firstName": $w('#firstname').value,
"lastName": $w('#lastname').value,
"address": $w('#address').value,
"position": $w('#position').value,
"organization": $w('#organization').value,
"howDidUHear": $w('#dropdown1').value,
"gradeLevel": $w('#gradelevel').value,
"tellUsMore": $w('#moreinfo').value,
"emails": emails,
"labels": labels,
}
});
});
});
import wixLocation from 'wix-location';
$w.onReady(function () {
$w('#submitButton').onClick(function () {
let email = $w('#email1').value;
let password = $w('#password').value;
wixUsers.register(email, password).
then(() => {
wixLocation.to('/member/me');
})
})
})