I know there's a way of doing this but I'm just not getting there through my own means:
I have created a lightbox with login fields connected to an existing imported db. The email field MUST have a certain @domain address.
What I would like to have happen is, when the email doesn't match the validation, a text prompts stating to use the required email format, and when it does match, it enables the continue button.
When you click the continue button, it shows the password input. When that is entered, it query's for the existing match, then text will show that it matches, and enables 'enter' button.
I'm not looking to create my own membership db and signup 'system', as these login's will be checked against existing data, not creating new data. But, most importantly, I am looking for the proper way to code these text alerts that can be shown without having to hit the submit button to be triggered.
Any and all help is welcome! Below is the minimal code that I'm currently chipping away on and adding to based on reading and research. It's not correct, but it's where I ended up at before turning to the forum:
$w("#input1").onCustomValidation( (value, reject) => { if( !value.endsWith("@kernhigh.org") ) { reject("Email must be a kernhigh.org address."); $w('#text4').show(); } else { $w('#input1').resetValidityIndication(); $w('#button1').enable(); $w('#text4').hide(); } });
So I took a different route that I knew I'd be able to handle. In the site, users are directed to agree to terms after creating account. That form asks for their work email (validates @domain). I just set a query to gather the current user idea and submitted work email to check against that terms db to see that they match. If so, they are allowed access to forum.
Any ideas or suggestions out there? :-)