podio-php
podio-php copied to clipboard
adding new option to a category field using api
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?
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