{% if formSentAlias == __SELF__.alias and formError is empty and settingsGet('form_hide_after_success', 0) %} {# no errors and set to hide after send #} {% else %} {{ form_open(__SELF__.getFormAttributes) }} {% for field in __SELF__.fields %} {{ __SELF__.getFieldHtmlCode(field)|raw }} {% endfor %} {{ __SELF__.getAntispamFieldHtmlCode({})|raw }} {{ __SELF__.getDescriptionFieldHtmlCode({})|raw }} {{ __SELF__.getRedirectFieldHtmlCode({})|raw }} {% if settingsGet('add_google_recaptcha') and settingsGet('google_recaptcha_site_key') %}
{% endif %} {{ __SELF__.getSubmitButtonHtmlCode({})|raw }} {{ form_close() }} {% endif %} {% if settingsGet('add_google_recaptcha') and settingsGet('google_recaptcha_scripts_allow') %} {% put scripts %} {% set apiParams = [] %} {% if settingsGet("google_recaptcha_locale_allow") and currentLocale %} {% set apiParams = apiParams|merge(['hl='~currentLocale]) %} {% endif %} {% set apiParams = apiParams|merge(['onload=onloadCallback_'~__SELF__.alias]) %} {% set apiParams = apiParams|merge(['render=explicit']) %} {% endput %} {% put scripts %} {% endput %} {% endif %}