Hi,
I have been trying to add some validation to a currency field, so that values entered must be less than the value in another currency field.
I've borrowed some code from this forum and replaced the fields with my own:
$(document).ready(function() { $('.Submit').hide(); $('#q15 input').on('blur change', function() { if ($('#q15 input').val() >= $('#q5 input').val()) { $('.Submit').hide(); } else { $('.Submit').show(); } }); });
#q5 is my max/upper limit field.
#q15 is my currency field that I want the "validation" to apply to.
The end result should be that if a value is entered in #q15 that is greater than the value in #q5, then the Submit botton should be hidden.
If it is less than or equal to #q5 then the submit button is visible.
I'm getting odd results whereby if I enter an exact amount it works, but a "less than" amount does not match.
Any suggestions? Thank you!