Adding an App Reference or Appending a Text Field

Answered

Comments

3 comments

  • Andreas Haugstrup Pedersen

    When updating a field value you always replace all existing values. So if you want to append additional values you first have to fetch existing values.

    1
    Comment actions Permalink
  • Davin Green

    Did you eventually get this to work? I'm having an issue updating the app reference field type after appending new info to the field value and attempting to update...

    $asssociated_contacts = PodioItem::get_field_value( $_POST['item_id'], $contacts_field_id );
    $asssociated_contacts[]['value'] = get_object_vars($contact_object_to_add);
    PodioItemField::update( $_POST['item_id'], $contacts_field_id , array('value' => $asssociated_contacts));

    Throwing an error. Help!

    0
    Comment actions Permalink
  • Andreas Haugstrup Pedersen

    Hi Davin,

    It's almost always easier to work with the Podio objects rather than calling static methods. There are guides if you start here and read the following two sections as well: http://podio.github.io/podio-php/objects/

    /Andreas

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk