1

I have this simple two methods in PaymentController

def checkout3(){


}

def receipt3() {

   render params

   return

}

The checkout3.gsp is a simple form as follows

<g:form name="payform" action="receipt3">


   <g:textField name="cardNumber"/>

   <g:submitButton name="submit" value="submit"></g:submitButton>

</g:form>

Now i go to checkout3 url and in the form enter something in cardNumber field and click submit

The output of receipt3 is as follows: You can see that cardNumber form param is missing. I have tried with other fields and no fields values are passed to the controller.

['action':'receipt3', 'controller':'payment']

The same example works on other controllers. i.e created the same above methods and views in a new test controller called TestController and it prints the cardNumber as follows where i had entered "testing" in cardNumber field

['submit':'submit', 'cardNumber':'testing', 'action':'receipt2', 'controller':'test']

So my question is whether there is a way to disable form params passing to a particular controller? Please note that the first example wasn't written by me so i am investigating what is the reason for params not showing form params in the first case. I appreciate any help! Thanks!

kofhearts
  • 3,607
  • 8
  • 46
  • 79

0 Answers0