Support

Account

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

Helping

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" => "http://www.facebook.com") 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)

The topic ‘Updating (update_field) a select field value within a repeater’ is closed to new replies.