Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/14/2017 in all areas

  1. I have a similar issue, but on a Submission DataPage, and I don't need any preselection. Using javascript I was able to create a multi-select listbox that stores the user’s selections as comma-separated values in a single line: writer, director, actor, producer Now I would like to create a Search List DataPage that allows users to search this data using a listbox like this: writer director actor producer Currently, the comma-separated values from each user’s submissions show on a single line. How can I get these values broken up onto separate lines of the listbox on a List DataPage?
    1 point
  2. If you have more than one listboxes on your details or update user this code <script> // Function for selecting corresponding elements from the list box. function select_ (){ // get listbox element var o_els = new Array("EditRecordFIELDNAME","EditRecordFIELDNAME2","EditRecordFIELDNAME3"); for (var k=0; k< o_els.length; k++ ) { var o_el = document.getElementById(o_els[k]); // Enable multiselect for listbox o_el.multiple="multiple"; // get listbox length var len = o_el.options.length; // get selected element var selected = o_el.options[len-1].value; // verify if selected element contains comas, if yes, do the following if (selected.indexOf(",") != -1 ){ // Split selected option into array var m_array = new Array();m_array=selected.split (","); // Delete last option from the listbox o_el.options.remove(len-1); // Go through listbox and select each option, if it is present in array for( var i=0; i< m_array.length; i++ ){for( var j=0; j< len-1; j++ ){ // Trim spaces while comparing elements from array and listbox if( m_array[i].replace(/^s+|s+$/g, '') == o_el.options[j].value ){ o_el.options[j].selected = "selected"; } } } } } } // call select_ funtion when details page is loaded window.onload = select_; </script>
    1 point
×
×
  • Create New...