From fbf27aa3e6467d854f670d3db58d5ec47291b899 Mon Sep 17 00:00:00 2001 From: RomainLvr Date: Tue, 12 May 2026 10:10:29 +0200 Subject: [PATCH 1/3] Fix - Convert empty dropdown value (-1) to null on form submission --- inc/destinationfield.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/destinationfield.class.php b/inc/destinationfield.class.php index 831f2081..e5ad8782 100644 --- a/inc/destinationfield.class.php +++ b/inc/destinationfield.class.php @@ -135,7 +135,8 @@ public function applyConfiguratedValueToInputUsingAnswers( $input[sprintf('itemtype_%s', $field_name)] = $answer->getRawAnswer()['itemtype']; $input[sprintf('items_id_%s', $field_name)] = $answer->getRawAnswer()['items_id']; } elseif ($field->fields['type'] == 'dropdown') { - $input[$field_name] = $answer->getRawAnswer()['items_id']; + $raw_id = $answer->getRawAnswer()['items_id']; + $input[$field_name] = ($raw_id > 0) ? $raw_id : null; } else { $input[$field_name] = $value ?? $answer->getRawAnswer(); } From 9161f564eca08fd1a29aa477dffedb76dee2380a Mon Sep 17 00:00:00 2001 From: RomainLvr Date: Tue, 12 May 2026 10:15:49 +0200 Subject: [PATCH 2/3] Update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ab8beb8..0e5cbc3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Fixed +- Fix empty dropdown value (-1) on form submission - Fix text area fields size and alignment - Optimize container loading when there are a large number of entities From 86d4aacca7d65a16ce2a2225bfe99dc325020d2a Mon Sep 17 00:00:00 2001 From: Romain Lecouvreur <102067890+RomainLvr@users.noreply.github.com> Date: Wed, 13 May 2026 09:41:58 +0200 Subject: [PATCH 3/3] Update inc/destinationfield.class.php Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com> --- inc/destinationfield.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/destinationfield.class.php b/inc/destinationfield.class.php index e5ad8782..3cc553cc 100644 --- a/inc/destinationfield.class.php +++ b/inc/destinationfield.class.php @@ -135,7 +135,7 @@ public function applyConfiguratedValueToInputUsingAnswers( $input[sprintf('itemtype_%s', $field_name)] = $answer->getRawAnswer()['itemtype']; $input[sprintf('items_id_%s', $field_name)] = $answer->getRawAnswer()['items_id']; } elseif ($field->fields['type'] == 'dropdown') { - $raw_id = $answer->getRawAnswer()['items_id']; + $raw_id = (int) $answer->getRawAnswer()['items_id']; $input[$field_name] = ($raw_id > 0) ? $raw_id : null; } else { $input[$field_name] = $value ?? $answer->getRawAnswer();