Skip to content

Commit 98bc11c

Browse files
Readme update
1 parent 1b5370b commit 98bc11c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,12 +307,16 @@ And don't forget the JsRoutingBundle.
307307
308308
```
309309

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+
311314

312315
``` twig
313316
314317
<form name="upload" action="{{ path('your_path') }}" {{ form_enctype(form) }} method="POST" onsubmit="return checkCoords();">
315318
319+
{{ form_widget(form.file, {'id':'file','data-route':'media_json_upload'})}}
316320
```
317321

318322
If you are rendering the form fields individually, you will need to include the following to your form

0 commit comments

Comments
 (0)