Skip to content

Latest commit

 

History

History
executable file
·
18 lines (15 loc) · 593 Bytes

File metadata and controls

executable file
·
18 lines (15 loc) · 593 Bytes

2.2 Issue with sub-requests

All the necessary data for validation forms are initialized in the included template (initializer) that was defined on the step 1.3 So if your form was rendered in sub-request, e.g.:

<div id="email">
    {{ render(controller('AcmeDemoBundle:Default:sendEmail')) }}
</div>

in this way the initializer does not know anything about that form. To fix it, you have to add the initialization to your sub-template manually:

{# AcmeDemoBundle:Default:sendEmail.html.twig #}

{{ init_js_validation() }}

{{ form(form) }}