podio-php icon indicating copy to clipboard operation
podio-php copied to clipboard

adding new option to a category field using api

Open netdust opened this issue 3 years ago • 1 comments

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?

netdust avatar May 03 '22 08:05 netdust

Please check https://help.podio.com/hc/en-us/community/posts/200518938-How-to-add-category-options-through-podio-api-PHP- and let me know if that helped

daniel-sc avatar May 03 '22 10:05 daniel-sc