Last active
January 25, 2021 16:45
-
-
Save carmoreira/ee474882f7f3ca221ae38535c28de2ae to your computer and use it in GitHub Desktop.
Make all user information fields mandatory in Advisor Quiz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var inputs = jQuery('.advq_before_results input'); | |
| var check = jQuery('.advq_hasemail'); | |
| check.css('opacity', '0.7').css('pointer-events', 'none'); | |
| inputs.each(function() { | |
| jQuery(this).on('keyup', function() { | |
| var completed = true; | |
| inputs.each(function() { | |
| if (jQuery(this).val() === '') { | |
| completed = false; | |
| } | |
| }); | |
| if (completed) { | |
| check.css('opacity', '1').css('pointer-events', 'auto'); | |
| } else { | |
| check.css('opacity', '0.7').css('pointer-events', 'none'); | |
| } | |
| }); | |
| }); | |
| //var inputs = jQuery('.advq_before_results input:not([name="advq_askinfo_4_field"])'); - to exclude specific field |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment