Support

Account

Home Forums ACF PRO Question on Wrapper Attributes

Solved

Question on Wrapper Attributes

  • This may be a bit more CSS than ACF but when setting the width with conditional logic is the following possible.

    I have two conditional toggles each one (when enabled take up one row). But as you can see when one is toggled off the second row jumps up to fill the void.

    Is it possible to keep each one on its individual row?

  • Hi @pthpndr

    That’s because you were trying to hide the text field, which makes the layout broken when it’s hidden.

    To fix it, you need to add CSS to the true/false fields. For example, you can add an extra class called “firstrow” and then add the CSS code like this:

    add_action('acf/input/admin_head', 'my_acf_add_style');
    function my_acf_add_style() {
        ?>
        <style>
            .firstrow{
                clear: left !important;
            }
        </style>
        <?php    
    }

    I hope this helps 🙂

  • Ahh, got it. Thank you James that explains a lot.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Question on Wrapper Attributes’ is closed to new replies.