getPost() on array element in plugin I'm trying to get data submitted from a form using craft()-&gt;request-&gt;getPost(), but I'm not sure what to do when the form name is an array element.

For example, I have a form with:

&lt;label for="notes"&gt;Notes&lt;/label&gt;
&lt;textarea rows="6" id="notes" name="fields[notes]"&gt;&lt;/textarea&gt;


and want to use:

craft()-&gt;request-&gt;getPost('fields[notes]');


but when I do this I don't get any data from the form, and I'm not sure what to put in getPost() to let it know its an array.

It will work fine if I change the name to "notes" and use getPost('notes'), but I'd like to be able to get it working with the array.
You can use dot notation:

craft()-&gt;request-&gt;getPost('fields.notes');