Welcome Guest, Not a member yet? Register   Sign In
Classic form, how to submit to call a controller method?
#1

[eluser]avastreg[/eluser]
The title is a little weird Smile

I need to know if there is a best-practice/how to to handle the submit of a form with method=get to call a method of a controller.

An explanatory example:

in controller_A view i have:
Code:
<form action="/controller_B/method/" method="get">

<input name="foo" value="get_value"...

</form>

I need to reach
Code:
/controller_B/method/get_value
but with that submit i get

Code:
/controller_B/method/?foo=get_value

Is there a way to do this or i have to manage it in ajax?
#2

[eluser]Dam1an[/eluser]
Is there a reason you can't use normal POST?
The only other way to set get_value is when you define the form action, although you don't know the value at that point :-S




Theme © iAndrew 2016 - Forum software by © MyBB