Reputation: 37
Supposing I have a twig like this, how can I get input value from my controller?
{{form_start(form)}}
{{form_row(form.row1}}
{{form_row(form.row2}}
{{form_row(form.row3}}
<input id='someid'>
{{form_end(form}}
Upvotes: 2
Views: 2764
Reputation: 39380
You can access as:
$request->request->get('someid', 'default values');
More info here.
Upvotes: 1
Reputation: 7764
I used the link from @Matteo 's answer, which is also correct. For your case I think it would be like this:
$someid = $request->query->get('someid');
Try that.
Upvotes: 0