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>

 

Link to post
Share on other sites
  • 8 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...