Support

Account

Home Forums Add-ons Repeater Field Automatically creating sub_fields of repeater/flexible content depending on name Reply To: Automatically creating sub_fields of repeater/flexible content depending on name

  • The reason that this is happening is that every time you run the code the sub fields get assigned a different field key

    
    key' => 'field_' . uniqid(),
    

    When ACF tries to get the value of the new field by the key there is no field value in the DB that using that’s field key. The field key must be the same every time the field is added.