Master Posted July 1, 2016 Report Share Posted July 1, 2016 How can I show the values that are selected on a listbox in submission page in a virtual field? Quote Link to comment Share on other sites More sharing options...
MayMusic Posted July 1, 2016 Report Share Posted July 1, 2016 Use the code below : <SCRIPT LANGUAGE="JavaScript"> var field= "InsertRecordFIELDNAME"; var x=document.getElementsByName(field); x[0].multiple=true; document.getElementById("Submit").onmouseover= function(){ var l = document.getElementById(field); for (var i = 0; i < l.options.length; i++) { if(l.options[i].selected == true){ var o = o + "," +l.options[i].value; } } document.getElementById('cbParamVirtual1').value = o.substring('undefined,'.length); } </SCRIPT> in "InsertRecordFIELDNAME" replace FIELDNAME to the listbox field name. And also "cbParamVirtual1" is the ID of Virtual 1. This code will trigger on hovering over submit button. To fire the code when selection is done you can change document.getElementById("Submit").onmouseover to document.getElementById(field).onblur Quote Link to comment Share on other sites More sharing options...
Kurumi Posted December 24, 2018 Report Share Posted December 24, 2018 Hi @Master, As of July 12, 2018, Caspio introduced new features which you can find here: https://howto.caspio.com/release-notes/caspio-bridge-13-0/ This release includes a new feature, Calculated Values in Submission Forms. You can use this to your Virtual Field to get the value of your Listbox. Check these videos for more information: I hope this helps! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.