Hello, I'm still new to both Laserfiche and Javascript so any help is much appreciated. I have code sort of working that I sourced from Ege Ersoz but it isn't easy to scale if the data in my list ever changes and I need it to work for validating multiple values.
Our end user wants to disable the submit button on a form and display a message if a 5-digit number doesn't specifically match a static list of about 2500+ numbers.
What I have works for a single digit, but I need to have about 2500 more 5-digit numbers (which I also have in an excel list) and I want to display text that says something like "This number isn't valid" if a 5-digit number entered does not match my list.
I'm still researching how to accomplish this, but I'm reaching out to see if someone has a better solution or more appropriate code for my needs.
$(document).ready(function() { $('.Submit').hide(); $('#q17 input').on('blur', function() { if ($('#q17 input').val() == "01234") { $('.Submit').show(); } else { alert('It appears you are not eligible'); $('.Submit').hide(); } }); });
Edited: I have the pop up message working, just curious how to get multiple data validation.