Unable to capture POST data from simple form
Permalink
Hi. I have a custom block that worked fine with 5.6, that I am updating to work with 5.7.5.13. In the view is a simple form:
In the controller I am dumping the php REQUEST superglobal:
I get this:
array(1) { ["xa"]=> string(1) "2" }
xa=2
ref=
this->post=
None of the posted data is contained within $_REQUEST or $this->post('ref'). I've tried changing the input name. I've tried using $_POST. I tried everything I can think of. Can anyone tell me what I'm missing please?
<form name="set1" id="set1" method="post" action="/adults/booking-test?xa=2"> <input name="f_class" type="hidden" value="1"> <select class="form-control" name="items" id="items"> <option value="0">0</option> <option value="1">1</option> </select> <input name="ref" type="hidden" value="144276"> </form>
In the controller I am dumping the php REQUEST superglobal:
I get this:
array(1) { ["xa"]=> string(1) "2" }
xa=2
ref=
this->post=
None of the posted data is contained within $_REQUEST or $this->post('ref'). I've tried changing the input name. I've tried using $_POST. I tried everything I can think of. Can anyone tell me what I'm missing please?
Brilliant - thanks for such a quick and detailed response. Before asking, I had carried out what I thought was a thorough search of the net and the c5 docs, but I obviously didn't look in the right places because I couldn't find anything along the lines of what you have just illustrated.
Unfortunately I can't really send you to a good place for documentation, the documentation is kind of a mess right now.
The in the controller