IN the every template i need to use this ststement
{{ form_stylesheet(form) }}
{{ form_javascript(form) }}
The the template gives error if the page is not haviing any form variable ie its normal page.
Is there any way that i can check if form
is present then load those otherwise not
if (form.present) then
{{ form_stylesheet(form) }}
{{ form_javascript(form) }}
{% if form is defined %}
{{ form_stylesheet(form) }}
{{ form_javascript(form) }}
{% endif %}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.