Team4- Montair LC Kid Non Rxber Survey, In form data, dropdown multiple values are getting in EXCEL

This commit is contained in:
Farhan Pathan 2026-06-15 18:54:39 +05:30
parent 484c856240
commit dac7f50e58
1 changed files with 16 additions and 0 deletions

View File

@ -756,7 +756,23 @@
$('#report-form').on('submit', function(event) {
event.preventDefault();
$('select[name*="current_prescribing_molecule_combination"]').each(function () {
let values = $(this).val();
if (Array.isArray(values) && values.length > 0) {
$(this).find('option').prop('selected', false);
let joinedValue = values.join(',');
$('<option>')
.val(joinedValue)
.text(joinedValue)
.prop('selected', true)
.appendTo($(this));
}
});
$("#pageloader").fadeIn();