Fomr 2.3 bug répondre à

This commit is contained in:
Fred Tempez 2020-06-03 08:54:48 +02:00
parent 4641fcf3d1
commit f6474295d4
1 changed files with 22 additions and 23 deletions

View File

@ -32,7 +32,7 @@ class form extends common {
public static $pagination;
const FORM_VERSION = '2.2';
const FORM_VERSION = '2.3';
// Objets
const TYPE_MAIL = 'mail';
@ -295,8 +295,8 @@ class form extends common {
}
// Préparation le contenu du mail
$data = [];
$content = '';
$replyTo = null;
$content = '';
foreach($this->getData(['module', $this->getUrl(0), 'input']) as $index => $input) {
// Filtre la valeur
switch($input['type']) {
@ -316,10 +316,9 @@ class form extends common {
$filter = helper::FILTER_STRING_SHORT;
}
$value = $this->getInput('formInput[' . $index . ']', $filter, $input['required']) === true ? 'X' : $this->getInput('formInput[' . $index . ']', $filter, $input['required']);
// premier chalmp email ajouté au mail en reply si option active
// premier champ email ajouté au mail en reply si option active
if ($this->getData(['module', $this->getUrl(0), 'config', 'replyto']) === true &&
$input['type'] === 'mail' &&
$replyTo !== null) {
$input['type'] === 'mail') {
$replyTo = $value;
}
// Préparation des données pour la création dans la base