I have a cached site which have a form in it which should not be cached. I use ESI for it. When the form is submit I need to get the POST Parameter in my controller. Symfony let me get the Request Parameter 'form' not the real POST Data or is there a good way to get them.

```
{{ render_esi(controller('MyBundle:Form:staticForm', {'form': 'sidebar'}))}}

```

Setting them in twig will not work because of Parent Page Cache.

```
{{ render_esi(controller('MyBundle:Form:staticForm', {'form': 'sidebar', 'request': }))}}

```

So how to get the post parameter in my controller currently the code shown here only gets me the ESI data:

```
public function staticFormAction(Request $request) {
    // ..
    $form->handleRequest($request);// will not work because:
    $request->get('firstName'); // is empty when called by ESI

```

How I can get the Parameters from the Parent Request?

**Hacky solution**

Currently the only solution I found is for me too hacky  

TWIG:

```
{{ render_esi(controller('ClientWebsiteBundle:Form:staticForm', app.request.request.all|merge({'form': 'sidebar'}), app.request.query.all)) }}

```

PHP:

```
$data = ($request->get('myFormName'));
if (count($data)) {
    // Forms uses $request->request
    $request->request->set('myFormName', $data);
    $request->setMethod('POST');
}

```

**Additional**

After a little research and look into symfony core code I need to change the ESI to Post so my question is know "**How to call ESI as POST method not GET?**"

**Solution**

Using requestStack like `Chris Tickner` posted seems the post solution.