diff --git a/config/config.yaml b/config/config.yaml index bed2fcb..efbc5c4 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -39,6 +39,11 @@ templates: subject: '@boltforms/subject.html.twig' files: '@boltforms/file_browser.twig' +# If the default templates are used, customise the layout. +layout: + form: 'form_div_layout.html.twig' # or see all options here: https://github.com/symfony/symfony/tree/5.x/src/Symfony/Bridge/Twig/Resources/views/Form + bootstrap: false # if true, bootstrap will automatically be included. + ## reCAPTCHa set up # # NOTE: You can get your keys from https://www.google.com/recaptcha/admin diff --git a/templates/form.html.twig b/templates/form.html.twig index 1a33ffa..3739419 100644 --- a/templates/form.html.twig +++ b/templates/form.html.twig @@ -1,7 +1,11 @@ {# this tag only applies to the forms defined in this template #} -{% form_theme form 'bootstrap_4_layout.html.twig' %} +{% set layout = config.layout.form|default('form_div_layout.html.twig') %} +{% form_theme form layout %} + +{% if config.layout.bootstrap %} + +{% endif %} -