I'm trying to get data submitted from a form using craft()->request->getPost()craft()->request->getPost()
, but I'm not sure what to do when the form name is an array element.
For example, I have a form with:
<label for="notes">Notes</label>
<textarea rows="6" id="notes" name="fields[notes]"></textarea>
<label for="notes">Notes</label>
<textarea rows="6" id="notes" name="fields[notes]"></textarea>
Andand want to use:
craft()->request->getPost('fields[notes]');
craft()->request->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()getPost()
to let it know its an array.
It will work fine if I change the name to "notes" and use getPost('notes')getPost('notes')
, but I'd like to be able to get it working with the array.