Skip to content
Snippets Groups Projects
Commit 778ace19 authored by Seamus Lee's avatar Seamus Lee
Browse files

Add in docmentation on setting value of multiselect custom value

parent 09496f77
No related branches found
No related tags found
No related merge requests found
......@@ -64,4 +64,10 @@ For entities other than the Contact Entity you can use an alternate notation to
!!! note
When retrieving custom data for contact entity, it will only return one value in the case of a multiple custom group set whereas for other entities (e.g. Address, or using the `CustomValue.get` API) you will get all custom data records that relate to the relevant entity
The CustomValue Entity implicitly determines what the `entity_table` variable should be when it is not supplied. If you find that the implicitly is not working out exactly, then specify the `entity_table` key.
The CustomValue Entity implicitly determines what the `entity_table` variable should be when it is not supplied. If you find that the implicitly is not working out exactly, then specify the `entity_table` key.
When setting the value of custom data that is of type checkbox or multivalue it is important to note that the options need to be passed in as an array. For example if i want to set options a and c of for custom value 2 on contact you should do the following
```php
$result = civicrm_api3('Contact', 'create', array('id' = 2, 'custom_2' => array('a', 'c'));
``` `
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment