1

Magento 2.3

I added a new text field to review.phtml, it looks like that:

<input type="text" id="tel" name="pptel" /> 

Now in my controller I am trying to get that value, like this:

$this->getRequest()->getParam('pptel');

Does not work, also $_POST and $_GET are empty. I guess the new field value is just not added to the request, but why? How would I do that?

Thanks

2
  • Are you sure the url to the controller is correct or the data sent has the value of input?
    – HuanTH
    Oct 12, 2022 at 9:11
  • I had it outside if the form ... put it inside the form and it works using getParam :-) Oct 13, 2022 at 10:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.