Hide error message on amendment

When a form user has entered non valid data on your form and presses send, the error message will appear. By adding this code, once they start to modify the incorrect fields the corresponding error message will be hidden.

Instructions

Add the HTML element to your form and paste in this JavaScript code below. You can also add it elsewhere on your WordPress site if you have access to do so.

1
2
3
4
5
6
7
<script>
   jQuery(document).ready(function ($) {
       $('.iphorm-element-text, .iphorm-element-textarea, .iphorm-element-captcha').keydown(function () {
           $(this).closest('.iphorm-element-wrap').find('.iphorm-errors-wrap').fadeOut();
       });
   });
</script>
<script>
   jQuery(document).ready(function ($) {
       $('.iphorm-element-text, .iphorm-element-textarea, .iphorm-element-captcha').keydown(function () {
           $(this).closest('.iphorm-element-wrap').find('.iphorm-errors-wrap').fadeOut();
       });
   });
</script>

Still having trouble? Head over to the forums.

Forums