Hi! Sorry about the late reply.
Using an array works for me while testing. I’ve set up a multiple select field and am passing an array of the values I wan’t selected to $args. Something like this:
$args = array(
'select' => array( 'value2', 'value3' ),
);
What does your code look like? 🙂
Thread Starter
jc57
(@jc57)
I was under the impression that profile values have to go in the “values” array and was trying something like this:
$args = [
'values' => ['adminSecName' => array("a", "b"), 'adding' => 'YES']
];
where ‘adminSecName’ is the field name for the select box I’m working with.
In your example it looks like you’ve specified the field name as it’s own key in the array. That didn’t seem to work for me either, but is it supposed to?
Oh, of course. The values are supposed to go in the values part of args, my example was wrong.
The way you have written it is the way I tested and it should work. Are you sure a and b are the actual values for the options? In ACF it’s possible to define both a value and a label for each of the options like this: “value : Label”. It’s the value that needs to be specified. 🙂
Thread Starter
jc57
(@jc57)
Yes, those are the values, but nothing shows up. Iv’ve tried it with the ‘value:label’ option as well and still don’t get anything. Any more ideas?
Thread Starter
jc57
(@jc57)
Thread Starter
jc57
(@jc57)
Just forgot to mark as Resolved