From 0d5ef374ff21cdf4b6d0927e33807fa33bf656ba Mon Sep 17 00:00:00 2001 From: Sandro Date: Wed, 4 Sep 2024 15:15:25 +0200 Subject: [PATCH] Profession as dataType freeform-dropdown #171 --- app/routes/list/category/event/subscribe.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/routes/list/category/event/subscribe.js b/app/routes/list/category/event/subscribe.js index 3bd2ac4..c69d827 100644 --- a/app/routes/list/category/event/subscribe.js +++ b/app/routes/list/category/event/subscribe.js @@ -18,7 +18,7 @@ function loadDropdownItems(fields) { .filter(item => item.dataType === 'dropdown') .map(item => getDropDownItems(item.options.dropdownItems) .then(options => { - + if(item.id === 'Nationality') { options.forEach(element => { element.Value = element.Value.split(':')[1].trim(); @@ -26,7 +26,10 @@ function loadDropdownItems(fields) { let setDefaultLand = options; let defaultLand = options.findIndex(nationality => nationality.Key === 2008100); setDefaultLand.splice(0,0,options[defaultLand]); - } + } + if (item.id === 'Profession') { + item.dataType = 'freeform-dropdown' + } if (item.options.options === undefined) item.options.options = options;