I am building out a custom registration form lightbox that connects to my database collection. I have all the fields set and each input connected. I have very basic code straight from the Wix articles. https://support.wix.com/en/article/corvid-tutorial-creating-a-custom-registration-form-with-code. However, I keep getting this error message when I’m in preview mode. The error does say what line it is on either.
I have tried testing after publishing, but even though I don’t get the error message in this mode nothing happens with the database. It’s just empty. I am getting a Failed to load resource: the server responded with a status of 429 (TOO MANY REQUESTS) while viewing it live, but when I click on the link by the error it gives me this. {“error”:“No JSON data was found”}.I also have a syntax error for the index page but it doesn’t say where. The only javascript I have written for this site is for the custom registration form, so I don’t know what that is. I don’t know if these are the cause of the issue but I thought I’d mention them.
I also checked the permissions and it’s collection type FormSubmission and that anyone can create content this content. The dataset is connected to that collection.
Any help would be great. I’ve looked at other posts on this error but I haven’t been able to solve it yet.
import wixUsers from ‘wix-users’ ;
$w.onReady( function () {
$w( ‘#createAccount’ ).onClick(() => {
let emails = ;
emails.push($w( ‘#email’ ).value);
// register as member using form data
wixUsers.register($w( ‘#email’ ).value, $w( ‘#password’ ).value, {
“contactInfo” : {
“firstName” : $w( ‘#firstName’ ).value,
“lastName” : $w( ‘#lName’ ).value,
‘phoneNumber’ : $w( ‘#phoneNumber’ ).value,
‘companyName’ : $w( ‘#companyName’ ).value,
“emails” : emails
}
});
});
});