diff --git a/src/FormRuntime.php b/src/FormRuntime.php index adbb792..6b88fb2 100644 --- a/src/FormRuntime.php +++ b/src/FormRuntime.php @@ -95,13 +95,16 @@ public function run(string $formName = '', bool $warn = true) $template = $config->get('templates')['form']; return $this->twig->render($template, [ - 'formconfig' => $formConfig, + 'boltforms_config' => $config, + 'form_config' => $formConfig, 'debug' => $config->get('debug'), - 'honeypotname' => $honeypotName, + 'honeypot_name' => $honeypotName, 'form' => $form->createView(), 'submitted' => $form->isSubmitted(), 'valid' => $form->isSubmitted() && $form->isValid(), 'data' => $form->getData(), + 'formconfig' => $formConfig, // Deprecated + 'honeypotname' => $honeypotName, // Deprecated ]); } } diff --git a/templates/form.html.twig b/templates/form.html.twig index 339e4a1..5e84e6e 100644 --- a/templates/form.html.twig +++ b/templates/form.html.twig @@ -1,8 +1,8 @@ {# this tag only applies to the forms defined in this template #} -{% set layout = config.layout.form|default('form_div_layout.html.twig') %} +{% set layout = boltforms_config.layout.form|default('form_div_layout.html.twig') %} {% form_theme form layout %} -{% if config.layout.bootstrap|default() %} +{% if boltforms_config.layout.bootstrap|default() %} {% endif %} @@ -23,8 +23,8 @@ {% endif %} {% if not valid %} - {% include '@boltforms/honeypotstyle.html.twig' with {'honeypotname': honeypotname} %} + {% include '@boltforms/honeypotstyle.html.twig' with {'honeypot_name': honeypot_name} %} {{ form(form) }} {% endif %} -