We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 556efcd commit 24952f0Copy full SHA for 24952f0
‎tmpl/default.php
@@ -147,6 +147,17 @@
147
scrollTop: $('#simple-contact-form-<?php echo $module->id; ?>').offset().top - 150
148
}, 300);
149
}
150
+
151
+ // Smooth Scroll to parsley errors
152
+ $('#simple-contact-form-<?php echo $module->id; ?>').parsley().on('field:validated', function() {
153
+ var errorNotice = $('ul.text-danger li');
154
+ if ( errorNotice.length ) {
155
+ $('html, body').animate({
156
+ scrollTop: errorNotice.offset().top - 100
157
+ }, 300);
158
+ }
159
+ });
160
161
$('#simple-contact-form-<?php echo $module->id; ?>').on('submit', function (e) {
162
e.preventDefault();
163
var formData = new FormData(this);
0 commit comments