In a posthook I'm using getvalue to retrieve the values of a form. For normal fields there's no problem.
$name = $hook->getValue('name');
But I also have a select field with different options that I use as tags. So the client can select more than one options in the list. (I use the jquery Select2)
<select name="source[]" multiple="multiple">
<option value="Google" [[!+fi.source:FormItIsSelected=`Google`]]>Google</option>
<option value="Facebook" [[!+fi.source:FormItIsSelected=`Facebook`]]>Facebook</option>
<option value="Twitter" [[!+fi.source:FormItIsSelected=`Twitter`]]>Twitter</option>
</select>
$source = $hook->getValue('source');
How can I get this array from this form? getValue doesn't seem to work (stays empty). Can't find any docs on it how to do this, hope somebody can help.
[ed. note: sitsol last edited this post 7 years, 7 months ago.]