Jump to content

ListBox Field - Get selected values and insert to another field in Submission Form

Recommended Posts

Hi Altair you can try this code to iterate though the selected list and append to each field:

Here's my table:


Here's the code to be added in the Footer:


document.addEventListener('DataPageReady', assignMultiple);
function assignMultiple() {
   /* You can modify the element ID as needed for x and y via Inspect Element/F12 */
   let x=document.getElementById('cbParamVirtual1');
   x.addEventListener("click", function() { 
     /* You can modify the element ID as needed for y */
     let y =document.getElementById('InsertRecordMulti_Email_Input');  
     y.value ="";
     var listLength = x.options.length;
     for(var i=0;i<listLength;i++){
           y.value = x.options[i].value + ";" + y.value;

Sample output:

Hope this helps!

Link to comment
Share on other sites

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.

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.

  • Create New...