Multiple Select #216

Closed
opened 2025-10-14 16:37:11 -06:00 by navan · 0 comments
Owner

Originally created by @PhilippeZuber on 6/21/2018

Hello there,

I'm using a dynamic select field with the multiple attribute. It looks like this:


<select id="semantic" name="semantic" class="form-control select2" multiple="multiple">
                                                                <?php
                                                                foreach ($semantic as $key => $value) {
                                                                    ?>
                                                                    <option <?php echo in_array($value['id'], @explode(',', @$word['semantic'])) ? 'selected' : ''; ?>  value="<?php echo $value['id']; ?>"><?php echo $value['name']; ?></option>
                                                                    <?php
                                                                }
                                                                ?>
</select>

The E-Mail I receive looks as follows:
word
Test
category
1
semantic
2
alters
1
email
test@byom.de

Now my problem is, that the user can select multiple items at semantic. But it will always send only one value.

What I tried was using name="semantic[]" instead which results in the same as for the mail but results in a different output in the spreadsheet where the value turns to "undefined" instead of "2".

What do I need to change?

Thanks

*Originally created by @PhilippeZuber on 6/21/2018* Hello there, I'm using a dynamic select field with the multiple attribute. It looks like this: ``` <select id="semantic" name="semantic" class="form-control select2" multiple="multiple"> <?php foreach ($semantic as $key => $value) { ?> <option <?php echo in_array($value['id'], @explode(',', @$word['semantic'])) ? 'selected' : ''; ?> value="<?php echo $value['id']; ?>"><?php echo $value['name']; ?></option> <?php } ?> </select> ``` The E-Mail I receive looks as follows: word Test category 1 semantic 2 alters 1 email test@byom.de **Now my problem is, that the user can select multiple items at semantic. But it will always send only one value.** What I tried was using name="semantic[]" instead which results in the same as for the mail but results in a different output in the spreadsheet where the value turns to "undefined" instead of "2". What do I need to change? Thanks
navan closed this issue 2025-10-14 16:37:12 -06:00
Sign in to join this conversation.
No labels
Priority-1
Priority-1
Priority-1
Priority-1
Priority-1
Priority-1
Priority-1
Priority-1
awaiting-review
awaiting-review
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
chore
chore
discuss
discuss
discuss
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
epic
epic
external-dependency
external-dependency
external-dependency
hacktoberfest-accepted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
in-progress
in-progress
in-progress
in-review
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
merge-conflicts
merge-conflicts
please-test
please-test
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
spam
spam
starter
starter
starter
starter
starter
starter
starter
starter
starter
technical
technical
technical
technical
technical
user-feedback
user-feedback
user-feedback
user-feedback
user-feedback
user-feedback
wontfix
wontfix
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github/learn-to-send-email-via-google-script-html-no-server#216
No description provided.