Skip to content

Commit

Permalink
Profession as dataType freeform-dropdown #171
Browse files Browse the repository at this point in the history
  • Loading branch information
schefbi committed Sep 4, 2024
1 parent 46d6bf8 commit 0d5ef37
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/routes/list/category/event/subscribe.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,18 @@ 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();
});
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;
Expand Down

0 comments on commit 0d5ef37

Please sign in to comment.