@bhardin
[URL=“https://forum.scriptcase.net/member/8333-bhardin”]Thanks for pointing out that those fields should be required because that is the issue that I have been having from the beginning and now I understand how and why it behaves this way. But if you accidentally un-check that they are required, all you need is a valid user to login. I think I am going to stick with adding the code to test for blank password and user.
So here is my test …
When I make the userid and password “Required” then nothing works when using the TAB as the setting for “Use Enter to”. If you use the “Submit” setting and leave any of those fields blank and hit ENTER while the focus is in one of those fields you get the yellow error popup box. This means that the form is handling the error.
If you remove the “Required” setting on those fields and use the TAB as the setting for “Use Enter to” then your code handles the errors and the “Sign in” button works to submit the form. If I change the setting for “Use Enter to” to “Submit”, then you get combination of the errors (Yellow or Red) depending on what has focus. If one of the fields has focus that you get the yellow popup, if the “Sign In” button has focus you get the red error message.
@rik
All I did was to add the below to the beginning of the code in the “onValidate” event. The reason I needed it it’s because I did not have the userid nor the password as required. I prefer it this way since the app_login app is behaving as it should and an extra security measure in case I un-check that those fields are required. I want to be clear that I am using LDAP and Total control when I create the security module.
/** read login, pswd from user entering
*/
$login = {login};
$pswd = {pswd};
/** Make sure the login or password are not blank
*/
if(($login !== “”) and ($pswd !== “”))
{ regular code here}
else
{ send error message}