File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -307,12 +307,16 @@ And don't forget the JsRoutingBundle.
307
307
…
308
308
```
309
309
310
- 9. Now add the form tag the coordinate checker and render your form
310
+ 9. Now add the form tag the coordinate checker and render your file field like so. You can pass the route for upload thru
311
+ the html data attributes. supported data attributes are data-route, the route you will handle the upload and
312
+ the data-id attributes used to handle any extra route id parameter.
313
+
311
314
312
315
``` twig
313
316
…
314
317
<form name =" upload" action =" {{ path('your_path') }}" {{ form_enctype(form) }} method =" POST" onsubmit =" return checkCoords();" >
315
318
…
319
+ {{ form_widget(form.file, {'id':'file','data-route':'media_json_upload'})}}
316
320
```
317
321
318
322
If you are rendering the form fields individually, you will need to include the following to your form
You can’t perform that action at this time.
0 commit comments