I have a search form that passes parameters to a results datapage. The search form has a listbox with virtual fields. I want to enable multiple selections for the listbox so that when the user selects multiple items such as School A, School B, School D, the results page will show all results containing School A, School B, or School D.
I found the code to enable multiple selections here: http://forums.caspio.com/viewtopic.php?f=14&t=12154. Here is the code:
<SCRIPT LANGUAGE="JavaScript">
/* "fieldName" is the variable name for the listbox type form element field. */
var fieldName = "InsertRecordStates";
var x=document.getElementsByName(fieldName);
x[0].multiple=true;
</SCRIPT>
I also found out here: http://forums.caspio.com/viewtopic.php?f=3&t=12794&p=15793&hilit=listbox+virtual+field#p15793 that if you're using virtual fields, you have to replace "InsertRecordStates" with "cbParamVirtualXX".
Finally the field in the results datapage that is receiving the parameters is set to "Contain".
After doing all this, the problem I'm having is that the results page only shows results that contain all three (School A, School B, and School D) instead instead of showing results that contain any of the Schools A, B or D.
Any help would be appreciated.