Home Forums Bug Reports Bug in field name and id with repeater


Bug in field name and id with repeater

  • Hello,

    Each field name inputs have an id built using ancestors, row and current key :

    <input type="text" id="acf-field_578ba72a39775-row-0-field_5ca8e6c217d33-row-3-field_5cb2d4ea9222c" name="acf[field_578ba72a39775][row-0][field_5ca8e6c217d33]<strong>[row-3]</strong>[field_5cb2d4ea9222c]">

    But when I created a new one to add a new row, the row information is a little bit strange … Instead of “row-xx” , I got somthing like ‘5cceaf118c638’, see below …

    <input type="text" id="acf-field_578ba72a39775-row-0-field_5ca8e6c217d33-5cceaf118c638-field_5cb2d4ea9222c" name="acf[field_578ba72a39775][row-0][field_5ca8e6c217d33]<strong>[5cceaf118c638]</strong>[field_5cb2d4ea9222c]">

    This occurs both in 5.7.xx and 5.8.RC2


  • This is how ACF creates a new row. The index is a temporary unique id that is only used for the new row that will be replaced after updating. It is not a bug, but the way it’s made to work. Is it causing you an issue?

  • Thanks for the quick answer.
    It was causing me an issue because I’m trapping repeater row creation events to maintain a set of data I need to the ‘field sync tool’ I’m developping.

    This was based on rows number in id… but found another way to do what I want !

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

The topic ‘Bug in field name and id with repeater’ is closed to new replies.