• Resolved darthyoda6

    (@darthyoda6)


    In the 1.4.3 version, you changed the order to

     } else if ($group.css('display') !== 'none' && $group.hasClass('wpcf7cf-hidden')) { // hide the group
    	
    	
    	if ($group.attr('data-clear_on_hide') !== undefined) {
    		$inputs = $(':input', $group).not(':button, :submit, :reset, :hidden');
    		$inputs.prop('checked', false).prop('selected', false).prop('selectedIndex', 0);
    		$inputs.not('[type=checkbox],[type=radio],select').val('');
    		$inputs.change();
    		//display_fields();
    	}
    
    	if ($group.prop('tagName') === 'SPAN') {
    		$group.hide().trigger('wpcf7cf_hide_group'); // Never animate inline groups because it tends to look messy.
    	} else {
    		$group.animate(hide_animation, animation_outtime).trigger('wpcf7cf_hide_group');
    	}
    
    }

    but in 1.5 you changed it back to

    
     } else if ($group.css('display') !== 'none' && $group.hasClass('wpcf7cf-hidden')) {
    	if ($group.prop('tagName') === 'SPAN') {
    		$group.hide().trigger('wpcf7cf_hide_group');
    	} else {
    		$group.animate(hide_animation, animation_outtime).trigger('wpcf7cf_hide_group'); // hide
    	}
    
    	if ($group.attr('data-clear_on_hide') !== undefined) {
    		$inputs = $(':input', $group).not(':button, :submit, :reset, :hidden');
    		$inputs.prop('checked', false).prop('selected', false).prop('selectedIndex', 0);
    		$inputs.not('[type=checkbox],[type=radio],select').val('');
    		$inputs.change();
    		//display_fields();
    	}
    }

    So once again the fields will not be found because they’re hidden first.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘clear_on_hide not working again after 1.5 update’ is closed to new replies.