Support

Account

Home Forums Bug Reports Repeater + conditional logic losing content when adding/rearranging rows Reply To: Repeater + conditional logic losing content when adding/rearranging rows

  • Hi @soojooko

    Thanks for the reply.

    The flexible content field layouts should remain closed on page load, if they are staying open, perhaps there is a bug I am not aware of. Are you using ACF PRO, or ACF4 + add-on?

    It sounds like you will require some sort of conditional logic without disabling the inputs.

    You may be able to make use of some JS actions to prevent ACF from disabling the inputs. That way you can continue to use conditional logic without the original issue.

    
    <script type="text/javascript">
    (function($) {
    	
    	acf.add_action('hide_field', function( $field, context ){
    		
    		// bail early if not conditional logic (may be tab field)
    		if( context !== 'conditional_logic' ) {
    			
    			return;
    			
    		}
    		
    		
    		// maybe review $field name, key to avoid this on all fields?
    		// ...
    		
    		
    		// remove disable
    		$field.find('.acf-clhi').removeAttr('disabled');
    		
    	});
    	
    })(jQuery);	
    </script>
    

    Let me know if the above is confusing, basically, once added to the admin page, this will undo the ACF logic which disables inputs via conditional lgoic

    Thanks
    E