Home Forums General Issues update_field not updating fiel Reply To: update_field not updating fiel

  • Error: Duplicate reply detected; it looks as though you’ve already said that.
    It is so very bizarre and do not understand what is going on. I am hoping you can answer some of my previous questions. It would help me understand what’s going on.

    As already explained under FIELD GROUPS I have:

    Key: group_647d9f906d00a

    In the above group I have FIELDS:

    Name: FS SKI RESORT DATA (and it is defined as a group
    Key: field_64b38c4e3ec56

    In above, I have many sub fields and here is an example of one:

    Field Name: qgis_aa_zoom
    Key: field_64c782fc4c55d

    Now, if I do this;

                $result = update_field(field_64c782fc4c55d,11, 1110);
                $arraydata = get_field_object(field_64c782fc4c55d,1110);
                echo $arraydata['value'];

    I get 11. If I change to 7, I get 7. It seems to update. Is this because I am creating a new entry as a parent? Why would this work? When I look at my sub field view, it is not updated.

    Now, if I do this:

                $result = update_sub_field(array('field_64b38c4e3ec56', 'field_64c782fc4c55d'), 3, 1110);
                $arraydata = get_field_object(field_64c782fc4c55d,1110);
                echo $arraydata['value'];

    It is not updated and gives me the old value from above on the screen.