Support

Account

Home Forums Add-ons Repeater Field Repeater – Instruction placement

Solving

Repeater – Instruction placement

  • Why I cannot switch Instruction placement below fields in repeater field ?
    In other fields seems as it works well.

    Installed Beta ACF on other website and tried to make repeater and Instruction placements go under field. Installed Beta on same problematic website and Instruction placements are still wrong placed, under label.

    Is there any settings in database I can change it manually ?

    I mean fields are easy to make again, but template was very complicated and I would like to avoid doing it from start again, if possible. And some entries in Posts are already there. Dont think it would help either. Tried to make new repeater group, and descriptions are still under labels.

    Is it a bug ?

    (I cleared transients too, several times)

  • No, i was wrong. Even on other website, Beta RC candidate version, it is the same.
    Repeater has Instructions undel labels, not under fields. With Tab or without it.

    Is it maybe oversight when coded, or by purpose for some reason ?

    If it can be easy fixed please do it. Eyes visually allways experience as more orderly and harmonic if fields are in pixel inline, descriptions really doesnt matter so much if input fields line right.

  • Seems that nobody found a solution or at least a reasonable explanation why general “Instruction Placement” is ignored in Repeater fields.

  • Yes, the repeater field ignores the instruction placement on sub fields. This has been brought to the attention of the developer and something that he has plans on improving. I just don’t think it’s very high on the list of priorities.

  • Understood. Thank you!

  • +1 on this. In row layout at least the field space is much wider, so the rows would take up less vertical space. (screenshot)

  • +1 from me. Thank you.

  • Posting my workaround here in case it’s of use to anyone stumbling across this issue. First I use acf/load_field to move the instructions to a new item in the array and empty the instructions item, checking first to see if this is a child of my repeater field. Then I filter the output of all fields using acf/render_field to see if there’s an ‘instructions_below’ item in the array and output it after the input.

    add_filter( 'acf/load_field', 'tweak_repeater_instructions' );
    function tweak_repeater_instructions( $field ) {
    
    	if( 'group_123xyz' !== $field['parent'] ) return $field;
    
    	$field['instructions_below'] = $field['instructions'];
    	$field['instructions'] = '';
    
    	return $field;
    }
    
    add_filter( 'acf/render_field', 'position_repeater_instructions' );
    function position_repeater_instructions( $field ) {
    
    	if( ! isset( $field['instructions_below'] ) ) return;
    
    	echo '<p class="description">'.$field['instructions_below'].'</p>';
    }
Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘Repeater – Instruction placement’ is closed to new replies.