b1fea943 by Jeff Balicki

form validation

1 parent 5b8e13be
......@@ -17204,6 +17204,7 @@ ss3-force-full-width {
max-width: unset !important;
}
[name="acceptance[]"],
[name="contact-about-experience[]"] {
margin-left: -15px;
}
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
......@@ -359,4 +359,8 @@ $(window).on('load resize scroll', function() {
});
\ No newline at end of file
});
......
......@@ -63,5 +63,31 @@ get_template_part( 'global-templates/numbers_hero' );
</div>
</div>
</div>
<script type="text/javascript">
jQuery( document ).ready(function($) {
$('.wpcf7-submit').attr('disabled', 'disabled');
$(document).on("change","input , textarea",function() {
var empty = false;
$('input.wpcf7-validates-as-required').each(function() {
if ($(this).val() == '') {
empty = true;
}
});
if (!$('input[name="acceptance[]"]').is(":checked")) {
empty = true;
}
if (!$('textarea[name="talk-about"]').val().trim().length > 0) {
empty = true;
}
if (empty) {
$('.wpcf7-submit').attr('disabled', 'disabled');
} else {
$('.wpcf7-submit').removeAttr('disabled');
}
});
});
</script>
<?php
get_footer('numbers');
......
......@@ -690,6 +690,7 @@ height: 87vh;
max-width: unset !important;
}
[name='acceptance[]'],
[name='contact-about-experience[]'] {
margin-left: -15px;
}
......
......@@ -5,7 +5,7 @@
Author: the Understrap Contributors
Author URI: https://github.com/understrap/understrap-child/graphs/contributors
Template: understrap
Version: 1.1.30372
Version: 1.1.30373
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: understrap-child
......