here is my code. I have a twig form
I want to access it using symfony WebTestCase crawler like this, but it doesn't work. I want to use the Download button for testing purposes.
Does someone have a solution ?
<div class="modal-body">
{{ form(trackImageForm) }}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" onclick="$(this).prop('disabled', true);$('form[name={{ trackImageForm.vars.id }}]').submit()">Download</button>
</div>
i tried this
$form = $crawler->selectButton('Download')->form(array(...));
EDIT :
OK i can access to my form
{{ form_start(trackImageForm, {'attr': {'id': 'add_image_form'}}) }}
{{ form(trackImageForm) }}
i gave an id to my form and can n
$form = $crawler->filter('form#add_image_form')->form();
but will I be able to submit the form ?