diff --git a/module/Application/view/application/formule/test-saisir.phtml b/module/Application/view/application/formule/test-saisir.phtml
index 9e40f587f3a8692410dd7183a7af484d85a6a03d..359883e608ac634921ae30bbde95492cfee3e22d 100644
--- a/module/Application/view/application/formule/test-saisir.phtml
+++ b/module/Application/view/application/formule/test-saisir.phtml
@@ -649,7 +649,6 @@ echo $this->tag('h1', ['class' => 'page-header'])->html($title);
 
                     if ('structureCode' == name) {
                         if (value) that.ajoutStructure($(this), value);
-                        console.log(name, value);
                     }
 
                     $(this).val(value);
@@ -752,14 +751,14 @@ echo $this->tag('h1', ['class' => 'page-header'])->html($title);
                 var vhPCount = 0;
 
                 for (var i = 1; i < 6; i++) {
-                    if (formules[formuleId]['iParam' + i + 'Libelle']) {
+                    if (formuleId && formules[formuleId]['iParam' + i + 'Libelle']) {
                         this.element.find('tr.i-param-' + i).show();
                         this.element.find('th.i-param-' + i).html(formules[formuleId]['iParam' + i + 'Libelle']);
                     } else {
                         this.element.find('tr.i-param-' + i).hide();
                     }
 
-                    if (formules[formuleId]['vhParam' + i + 'Libelle']) {
+                    if (formuleId && formules[formuleId]['vhParam' + i + 'Libelle']) {
                         vhPCount++;
                         this.element.find('th.vh-param-' + i).show();
                         this.element.find('th.vh-param-' + i).html(formules[formuleId]['vhParam' + i + 'Libelle']);
@@ -838,9 +837,9 @@ echo $this->tag('h1', ['class' => 'page-header'])->html($title);
 
 
 
-            ajoutStructure: function (element, structure, noPrompt)
+            ajoutStructure: function (element, structure)
             {
-                if (noPrompt === true) {
+                if (!structure) {
                     structure = prompt("Ajout d'une nouvelle structure");
                 }