CommonGround Softworks Inc.


October 1, 1999 - Osmosis Technical Note 9


Subject: Multiple <Select> Submissions


Discussion:

One of the options HTML offers is the ‘Multiple Select’. This allows a user to select one or more choices (via a scrollable window) using a single input.

The HTML specification for this type of input is to pass a name/value pair for each selection. For example:

<select name=”UserEntry0” multiple>
<option value=”1”>one
<option value=”2”>two
<option value=”3”>three

If the user selects all three option values, HTML passes to Osmosis:

UserEntry0/1
UserEntry0/2
UserEntry0/3

Osmosis associates a UserEntry with a Helix field. Therefore, if multiple name/value pairs (of the same name) are submitted, Osmosis will read only the first name/value pair. Using our example, Osmosis would pass to Helix:

UserEntry0/1

then ignore the remaining name/value pairs.

From a data base standpoint, the desired objective is to pass multiple selections into a single field (separated by some delimiter). For example:

UserEntry0/1,2,3 (where ‘,’ is the defined delimiter).

Solution:

To accomplish this a special JavaScript has been written. A downloadable html page is provided which contains an example, instructions, and complete source code. If you are unfamiliar with JavaScript, you might want seek professional assistance.

Click here to download.
___________

We appreciate the efforts of Aaron Caine in helping to resolve this problem.


 

webmaster@CommonGrnd.com