From 3bddbe0f6f7edf2fb09ee65771af75404b0ab0f5 Mon Sep 17 00:00:00 2001 From: David Whittaker Date: Mon, 25 Mar 2024 10:58:20 -0700 Subject: [PATCH] Adding new form type that allows new values --- .../static/dispatch/src/forms/store.js | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/dispatch/static/dispatch/src/forms/store.js b/src/dispatch/static/dispatch/src/forms/store.js index aefa50e0e6b2..e9672cf7a7ee 100644 --- a/src/dispatch/static/dispatch/src/forms/store.js +++ b/src/dispatch/static/dispatch/src/forms/store.js @@ -192,12 +192,21 @@ function getCurrentPage(form_schema) { } } else { if (hasFormkitPro) { - obj = { - $formkit: "dropdown", - multiple: true, - options: item.options, - "selection-appearance": "tags", - ...obj, + if (item.allow_new) { + obj = { + $formkit: "taglist", + allowNewValues: true, + options: item.options, + ...obj, + } + } else { + obj = { + $formkit: "dropdown", + multiple: true, + options: item.options, + "selection-appearance": "tags", + ...obj, + } } } else { obj = {