Home Forums Add-ons Flexible Content Field update_field and flexible field Reply To: update_field and flexible field

  • @acf-support Could you post an example of using update_sub_field() to add data to a field inside a flexible content layout?

    I can’t see any example for other than a repeater field in the doc page and tried using the Flexible Content field name and field and value but no luck yet.

    update_sub_field( array( 'my_fc_layout_field_name', 1, 'document' ), 623 );

    In the screenshot is reflected my Flexible Content field and Layout with field (document) I want to add the media ID value 623.