Skip to content

Instantly share code, notes, and snippets.

@kirandash
Last active April 6, 2017 11:01
Show Gist options
  • Select an option

  • Save kirandash/af476c2b14d03f6ccbabc6e25682d2d3 to your computer and use it in GitHub Desktop.

Select an option

Save kirandash/af476c2b14d03f6ccbabc6e25682d2d3 to your computer and use it in GitHub Desktop.
Custom validation error position - Gravity form
<script>
var errorHtml = jQuery('.validation_error').html();
if(jQuery('#contact-form .gform_wrapper').hasClass('gform_validation_error')){
jQuery('#contact-form .validation_error').remove();
jQuery('#contact-form .gform_footer').append('<div class="validation_error"><span>'+errorHtml+'</span></div>');
}else {
jQuery('.validation_error').css('display', 'none');
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment