Home Forums Add-ons Repeater Field Updating (update_field) a select field value within a repeater


Updating (update_field) a select field value within a repeater

  • Hey,

    I’m trying to update fields using the update_field function. I’m trying to add values within a repeater that exists of the two following fields.

    1. Type (name: type, type: select)
    2. URL (name: url, type: url)

    I’m adding the values within an array that looks like this: $row = array("type" => "facebook", "url" => "") which is then to the function inside of an array. update_field("repeater", array($row), $id)

    It works fine except for the part of adding the value to the select field. For some reason the select value isn’t passed correctly. Does anyone know what’s wrong here?

  • Works now, for some reason ACF refused adding it to this field, had to rename the field (repeater) and afterwards it worked fine.

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

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.