Hi @tracylyndoyle !
This code you’re using is intended to act as an example but it’s by no means a finished product.
The first part that needs additional work is this:
let email = // the user's email addresses
let password = // the user's password
let firstName = // the user's first name
let lastName = // the user's last name
let phone = // the user's phone number
let nickname = // the user's nickname
The text coming after ‘//’ is called a comment. It explains what the code does to the person reading it but it does not run.
What you need to do is to assign values to each variable like that:
let email = $w('#email'); // the user's email addresses
// what comes after two slashes is a comment
// do the same for the other fields
Replace ‘email’ in $w(‘#email’) with the id of the email input element.
Note: Here I assume you’re not connecting the form to the database collection; in that case you’d probably use a dataset selector instead of $w(‘#email’).
Now, you need to put this code in an event handler so that it’s executed only after the user has clicked submit button.
The particular event handler you should be using depends on how you setup your form.
Most likely you need to add the onClick event handler to your submit button.
Let me know if you face any problems along the way.
Good luck!
Vytautas