Skip to content

Problem updating ACF relationship fields #403

@wiknoro

Description

@wiknoro

I'm using the ACF relationship fields for the board's posts, however I'm struggling to update the array data. I'm sending a POST request with the modified posts' array which actually reaches the correct field but it updates data to 0. Any help would be appreciated.

    const res = await axios({
        method: "POST",
        url: `${process.env.URL}/wp-json/acf/v3/boards/${boardId}`,
        data: {
          fields:{
            posts:`${posts}`
          }
        },
        headers: {
          Authorization: `Bearer ${token}`,
          "Content-Type": "application/json"
        },
      });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions