October CMS Magic Forms how to catch multi select values

It's possible you just need to make minor adjustments with the select name.

As when you select multiple items it becomes an array. to represent the array on the HTML side you need to add [] square braces to the name.

Suppose your current select name is tech So your select name becomes tech[] as now we are representing multiple values so it becomes an array.

<select required multiple id="tech" name="tech[]">
<!--                     USE name like THIS ^ -->
  <option value="HTML">
  <option value="CSS">
  <option value="JavaScript">
  <option value="Node.js">

It will work and in backend records, it will show something like this :


You can also check other types of Magic Forms such as empty ajax form, generic ajax form and upload ajax form.

js interview questions