• First, I have read https://contactform7.com/2017/06/07/on-sent-ok-is-deprecated/ — and as it won’t help me. I need help for on_submit.

    If anyone has an actual solution I’d appreciate knowing it.
    Is there a solution without changing to another form plugin? Maybe a plugin that works with CF7 but doesn’t create vulnerability hell.

    Or do you know another form plugin that will let me do what I need?

    My code is: on_submit: “$(‘fieldset label’).removeClass(‘wpcf7-error’);$(‘.wpcf7-not-valid’).each(function(){$(this).parents(‘fieldset’).find(‘label’).addClass(‘wpcf7-error’);});”

Viewing 1 replies (of 1 total)
  • Try adding this (sowewhere in your custom theme-scripts or footer)

    document.addEventListener( 'wpcf7submit', function( event ) {
    	$(‘fieldset label’).removeClass(‘wpcf7-error’);
    	$(‘.wpcf7-not-valid’).each(function({
    		$(this).parents(‘fieldset’).find(‘label’).addClass(‘wpcf7-error’);
    	});
    }, false );

    See https://contactform7.com/dom-events/

Viewing 1 replies (of 1 total)
  • The topic ‘On_Submit deprecated’ is closed to new replies.