Skip to content

adding new option to a category field using api #219

@netdust

Description

@netdust

I am trying to add a new option to PodioCategoryItemField using the podio php api

$field = new \PodioCategoryItemField('test'); // this field exists in Podio
$field->add_value( array(
         'value'=>array( 'status'=>'active','text' =>'some new option','color'=>'#FFF' ) // this option doesn't exist yet, I want to create and then set it
));

I can't get it to work. I have to set an id in the array, but if I do, I get an error that the option is not valid ( offcourse, I try to create a new one ). Unfortunately I can't find any solution googling and I am stuck.

Any ideas on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions