Support

Account

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

  • You stated, “It is not that confusing, if it is a sub field then you are using the wrong function/method to update the value.” but it is. See below:

    Name: FRESH SNOW SKI RESORTS”
    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
    Numeric

    I assume field_64c782fc4c55d (qgis_aa_zoom) is a sub field, right?

    Why does this work (although it does not show in the view as mentioned previously):

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

    and this not work;

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

    Is there any other way to post my php with out giving it to logged in users?