Skip to content
Advertisement

Form Multiselect option is only returning 1 option in message

this is my first time making a form, and I have multi-select option but I think I’m missing out something because the form is working but when selecting multiple options the email I receive is only showing 1 option.

JavaScript

send.php

JavaScript

Advertisement

Answer

You need to do a small change in your HTML. Add a bracket pair to the name attribute, to make PHP it recognize it as an array.

JavaScript

Afterwards in PHP you can use

JavaScript

To get all services as a comma separated list.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement