Support

Account

Home Forums Bug Reports Update multiple values in relationship field not possible

Unread

Update multiple values in relationship field not possible

  • Hello,
    I am using Advanced Custom Fields PRO Version 6.2.7

    Recently I have noticed that when I want to update a relationship field with multiple values, the whole ARRAY is not saved, but only the first value of the ARRAY.

    I have used this code as a test:
    update_field('menu', array(123,456), $post_id);

    This is the output with var_dump:
    int(123)

    These are my settings for the relationship field:
    {
    "key": "field_60c789afded44",
    "label": "menu",
    "name": "menu",
    "aria-label": "",
    "type": "relationship",
    "instructions": "",
    "required": 1,
    "conditional_logic": 0,
    "wrapper": {
    "width": "",
    "class": "",
    "id": ""
    },
    "wpml_cf_preferences": 1,
    "post_type": [
    "product"
    ],
    "taxonomy": [
    "product_cat:new"
    ],
    "filters": [
    "search",
    "taxonomy"
    ],
    "elements": "",
    "min": "",
    "max": "",
    "return_format": "id",
    "bidirectional_target": []
    },

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.