Jump to content

Multi-Select Virtual Fields, Only One Selection Being Saved


Recommended Posts

Hello, I have a registration form for Chapters of our organization that can represent more than one state, or even country.  I use a script that dynamically shows listboxes for state or province depending on whether the US or Canada is selected.  They both post to the same field, and so Virtual Fields are utilized.  This all works fine, but I need those Virtual Fields to be Multi-Select.  I do utilize the suggested script already, and I can get the Multi-Select to work on the form.

The problem is that even though my two Virtual Fields are Multi-Select, only one selection makes it to the table.  What is wrong with my script?

Country WORKS, it is not a Virtual Field, as does Languages_Spoken.  Virtual 2 and Virtual 3 WILL Multi-Select, but ONE selection makes it into the table.  I hope this explains clearly.  Form is at  https://c3gaf515.caspio.com/dp.asp?AppKey=54ce4000db281c70d086433eb0fc   Thanks

<SCRIPT LANGUAGE="JavaScript">
 /* "fieldName" is the variable name for the listbox type form element field. */
   var fieldName = "InsertRecordLanguages_Spoken";

   var x=document.getElementsByName(fieldName);
   x[0].multiple=true;

 /* "fieldName2" is the variable name for the listbox type form element field. */
   var fieldName2 = "InsertRecordCountry";

   var x=document.getElementsByName(fieldName2);
   x[0].multiple=true;

 /* "fieldName3" is the variable name for the listbox type form element field. */
   var fieldName3 = "cbParamVirtual2";

   var x=document.getElementsByName(fieldName3);
   x[0].multiple=true;

 /* "fieldName4" is the variable name for the listbox type form element field. */
   var fieldName4 = "cbParamVirtual3";

   var x=document.getElementsByName(fieldName4);
   x[0].multiple=true;

</SCRIPT>

 

Edited by BethShaffer
Added link to form
Link to comment
Share on other sites

  • 8 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...