Commit e57f9afc authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Correction plus custom vide

parent 1cbb68e7
Loading
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -277,8 +277,11 @@ class FormulaireReponseService
                $listing = array_filter($listing, function ($texte) {
                    return $texte !== '';
                });
                if (empty($listing)) { return null; }
                $texte = implode(";", $listing);
                return $texte;


            case Champ::TYPE_PLUS_CUSTOM :
                $nbFields = count(explode(";", $champ->getOptions()));

@@ -303,8 +306,11 @@ class FormulaireReponseService
                    for($i = 0 ; $i <$nbFields ; $i++) {
                        $subconcat[] = $items[$i]??"";
                    }
                    $test = implode('', $subconcat);
                    if (trim($test) !== "") {
                        $concat[] = implode(Champ::SEPARATOR_PLUS_CUSTOM_FIELD, $subconcat);
                    }
                }
                $values =  implode(Champ::SEPARATOR_PLUS_CUSTOM_GROUP, $concat);
                return $values;

+4 −4
Original line number Diff line number Diff line
@@ -94,11 +94,11 @@ $array = "[" . implode(",", $temp) . "]";
        //  console.log(dictionnary);
        if (dictionnary !== ['']) {
            for (let i = 0; i < dictionnary.length; i++) {
                if (dictionnary[i][0] !== "") {
                // if (dictionnary[i][0] !== "") {
                    ajouter_PlusCustom(sid, fields, dictionnary[i]);
                } else {
                    if (i === 0) ajouter_PlusCustom(sid, fields);
                }
                // } else {
                //     if (i === 0) ajouter_PlusCustom(sid, fields);
                // }
            }
        }