diff --git a/lizmap/plugins/formwidget/htmlbootstrap/htmlbootstrap.formwidget.php b/lizmap/plugins/formwidget/htmlbootstrap/htmlbootstrap.formwidget.php
index 5671371936..bd47ffdc00 100644
--- a/lizmap/plugins/formwidget/htmlbootstrap/htmlbootstrap.formwidget.php
+++ b/lizmap/plugins/formwidget/htmlbootstrap/htmlbootstrap.formwidget.php
@@ -52,6 +52,16 @@ public function outputHeader($builder)
*/
public function outputFooter($builder)
{
+ // Since jelix 1.8.7, we need to add `deprecatedDeclareFormBeforeControls` builder option
+ // because in the `outputHeader` we defined `jFormsJQ.declareForm(jFormsJQ.tForm);`
+ // and we use `parent::outputFooter($builder);`
+ $builder->setOptions(
+ array(
+ 'errorDecorator' => $builder->getOption('errorDecorator'),
+ 'modal' => $builder->getOption('modal'),
+ 'deprecatedDeclareFormBeforeControls' => true,
+ )
+ );
if ($builder->getOption('modal')) {
echo '';
}