Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding new option to a category field using api #219

Open
netdust opened this issue May 3, 2022 · 1 comment
Open

adding new option to a category field using api #219

netdust opened this issue May 3, 2022 · 1 comment

Comments

@netdust
Copy link

netdust commented May 3, 2022

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?

@daniel-sc
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants