Home Forums Backend Issues (wp-admin) Set Minimum Rows to 0


Set Minimum Rows to 0

  • Hello ACF Team,

    i want to set the minimum rows to 0. I use a repeater field in the backend that is NOT required. So the default would be 0 rows. But actually, that is not possible. If i give in 2 or 1 as minimum row, it is working as expected. The Repeater Field in the backend gives me 1 or 2 rows as default. But i want as default 0 rows, so if the user clicks to add row, 1 row will be appear.

    Is there a solution to realise this ? For example with filter hooks? And if yes, how can i realise it?

    Thanks !

  • I solved the problem with this code !

    function my_acf_load_value( $value, $post_id, $field )
    // run the_content filter on all textarea values
    $value = apply_filters(‘the_content’,$value);

    return $value;

    add_filter(‘acf/load_value/name=baustein_zusatzleistungen_repeater’, ‘my_acf_load_value’, 10, 3);

  • Hi @tolga

    Can you please better explain why a default of 0 does not work?
    The filter code you have provided is for a WYSIWYG field, and I can’t imagine how this helps the issue…

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

The topic ‘Set Minimum Rows to 0’ is closed to new replies.