Jump to content

Concatenating Virtual Fields Cascading Drop Downs


Recommended Posts

Please see the attached Screen Shot. This is the same working code in:
https://forums.caspio.com/topic/7022-time-sheet-date-and-time-in-and-out/

Only changes made were,  Dropdowns were changed to Cascading Dropdowns.

The following is not working. Anything obvious ? Please advise... Thanks for helping

<div id="con1">
<script>

  function concatenate1()
 {
  
   var One = document.getElementById("cbParamVirtual1").value;
   var Two = document.getElementByName("cbParamVirtual2")[0].value;
   var Three = document.getElementByName("cbParamVirtual3")[0].value;
   var Four = document.getElementById("cbParamVirtual4").value;
   var Five = document.getElementByName("cbParamVirtual5")[0].value;
 
  var link  =  One + " " + Two +":" + Three + ":"+Four + " "+Five;
   document.getElementById("InsertRecordDefined_Time_In").value = link;

 }

document.getElementByName("cbParamVirtual5")[0].onchange = concatenate1;
document.getElementById("cbParamVirtual1").onchange = concatenate1;
document.getElementByName("cbParamVirtual2")[0].onchange = concatenate1;
document.getElementById("cbParamVirtual3").onchange = concatenate1;
document.getElementByName("cbParamVirtual4")[0].onchange = concatenate1;

 </script>
</div>

<div id="con2">
<script>

  function concatenate2()
 {
   var Six = document.getElementById("cbParamVirtual6").value;
   var Seven = document.getElementByByName("cbParamVirtual7")[0].value;
   var Eight = document.getElementByByName("cbParamVirtual8")[0].value;
   var Nine = document.getElementById("cbParamVirtual9").value;
   var Ten = document.getElementByByName("cbParamVirtual10")[0].value;
  
   var linkout  =  Six + " " + Seven +":" + Eight + ":"+Nine + " "+Ten;
   document.getElementById("InsertRecordDefined_Time_Out").value = linkout;
 }
document.getElementByName("cbParamVirtual10")[0].onchange = concatenate2;
document.getElementById("cbParamVirtual6").onchange = concatenate2;
document.getElementByName("cbParamVirtual7")[0].onchange = concatenate2;
document.getElementByName("cbParamVirtual8")[0].onchange = concatenate2;
document.getElementById("cbParamVirtual9").onchange = concatenate2;


 </script>

 </div>
 

 

 

Cascading_Drop_Down_Screen_Shot.png

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.

Guest
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.

Loading...
×
×
  • Create New...