• hello!
    i have problem with comments sending. when form is empty wp returns white standard page(error-page) but i need checking form on empty fields. how can it be fixed?

Viewing 1 replies (of 1 total)
  • Hi vd1216,
    How you’re doing!!!
    Actually it’s WordPress default functionality and nothing to do with the theme…
    But you can fix this with below code using any custom JS plugin

    jQuery(document).ready(function($) {
        'use strict';
        jQuery('#commentform').submit(function(event){
        	if ( jQuery.trim(jQuery( "#comment" ).val()) == "" || jQuery.trim(jQuery( "#commentform input:first" ).val()) == "" ) {
    		    alert("Please fill the form ... ");
    		    event.preventDefault();
    		    return;
    		}
    
    	});
    });

    Have a nice day!!!
    Best,
    Gunjan kanungo

Viewing 1 replies (of 1 total)
  • The topic ‘problem with comments sending’ is closed to new replies.