Question:
Im looking to create a custom login page - unrelated to wix members. That has:
A text box
A button/link that only works if that text box contains “x” text.
Ideally, a way to view or receive email when each successful code is entered, so I can track.
Its important for this page to be custom and clean with only these two elements. Thanks in advance, please let me know if unclear!
Im not a coder, so as much detail / code as possible is much appreciated
Product:
Wix Studio Editor
V-Blog
January 5, 2025, 6:07am
2
Mike_Kenworthy:
Im looking to create a custom login page - unrelated to wix members. That has:
A text box
A button/link that only works if that text box contains “x” text.
Ideally, a way to view or receive email when each successful code is entered, so I can track.
Its important for this page to be custom and clean with only these two elements. Thanks in advance, please let me know if unclear!
Im not a coder, so as much detail / code as possible is much appreciated
Try this code, replace the IDs of elements
$w.onReady(function () {
$w("#button").onClick(() => {
const inputValue = $w("#textBox").value;
if (inputValue === "x") {
console.log("Correct code entered!");
} else {
console.log("Incorrect code.");
}
});
});
Just gotta note @Mike_Kenworthy - The code V-Blog uploaded is client-side, it is completely readable by the site visitor. So if this is some kind of secret code, use a web module and run this in the backend
1 Like