Arcadier / Developer-Community-Support

:revolving_hearts: Share new ideas with us and report bugs/problems here
4 stars 1 forks source link

jQuery doesnt fetch data from input fields #16

Closed jakusan closed 4 years ago

jakusan commented 5 years ago

Your issue/question: I’ve been trying to use jQuery to get the value of the input fields on the user creation page. I’m 100% sure i’m right but somehow i have only gotten the val() for the reconfirm_password, but not the password nor username.

This is my script to get those data:

var email = $(input[name='username']").val();
var pass = $(input[name='password']").val();
var cpass = $("input[name='reconfirm-password']").val();

var user_data = {
    "Email": email,
    "Password": pass,
    "ConfirmPassword": cpass
};
console.log(user_data);

What you expect to achieve

I’m trying to build an email verification plug-in which would force new users to verify their email address before gaining access to the marketplace - because Arcadier doesn’t have this implemented by default.

What happens instead

Assuming I put

var user_data = {
    "Email": johnsmith@arcadier.com,
    "Password": password1,
    "ConfirmPassword": password1
};
{ "Email": undefined, "Password": undefined, "ConfirmPassword": password1 }

Your system/software details Chrome on Windows 10