Mautic Community Forums

API hydrate multiple select with multiple values

Your software
My Mautic version is: 2.13.1
My PHP version is:5.63

Your problem
My problem is:

How to pass multiple values to multiple select with the API please?

These errors are showing in the log:

Steps I have tried to fix the problem:
I tried with a “|” but it didn’t work. However when I hydrate contact with a classic form, it shows the field with a “|” between each value in the contact list

1 Like

Finally just need to prefix the select multiple variable with [ ] as an array.
myVariable[0] => “value1”
myVariable[1] => “value2”

etc…

Resolved!

1 Like

Fantastic! Let’s mark it as solved so others find it! Glad you got it figured out in the end!