Jump to content

Elderberg

Members
  • Content Count

    22
  • Joined

  • Last visited

  1. Success! From trying a few other solutions from the forum I found one that worked: <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { var x = document.querySelector('[name*=InsertRecordSource_Shift]'); x.onchange = function() { var shift=document.getElementById("InsertRecordSource_Shift").value; if(shift==="AM" ) { document.getElementById("cbParamVirtual4").selectedIndex = "1"; } else { document.getElementById("cbParamVirtual4").selectedIndex = "0"; } } }); </script>
  2. Hey DN31137! I'm picking this back up after some weeks now. I was never successful. See below what i've used. I've also provided the deploy link below for reference. Any assistance would be appreciated. Thanks in advance. <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { document.querySelector('[id*=InsertRecordSource_Shift]').addEventListener('change', function() { var shift=document.getElementById("InsertRecordSource_Shift").value; if(shift==="AM" ) { document.getElementById("cbParamVirtual4").selectedIndex = "1"; } else { document.getElementById("cbParamVirtual4").selectedIndex = "0"; } } }); </script> Deploy URL: https://c1aco134.caspio.com/dp/b08a7000d5a1d377dc7c4779b2a6
  3. Hey George, thanks for the support... Unfortunately, I was not successful in testing the above. Is there an alternate I can test? or can you confirm if this would work on a dropdown box?
  4. Hi, See below in green which i've spliced into the browser using 'inspect element'. how do I implement this within Caspio? <tr><td class="cbFormLabelCell cbFormLabel"><label for="InsertRecordSource_Shift">Shift</label></td><td class="cbFormFieldCell"> <select name="InsertRecordSource_Shift" id="InsertRecordSource_Shift" onchange="myFunction()" class="cbFormSelect"> <option value="AM" selected="selected">AM</option> <option value="PM">PM</option> </select></td></tr>
  5. Ok, so i got it to work. so for the benefit of others: 1. All the code can remain in the header. 2. Formatting using the mask happens in real time as the user types 3. Just a tip as to why it wasn't initially working for me: when using a virtual field, say Virtual7 you need to use: document.getElementById('cbParamVirtual7') and NOT document.getElementById('Virtual7')
  6. Hey Andrew, thanks for this, i'm trying to get this implemented. Can you clarify a few things as i'm not yet successful after following the above the best i could. 1. Does all of the script code go in the header? or does part of it go in the footer? 2. Is it that once the user starts typing numbers into a text field it should automatically be formatted for them visually as they type? or is this something that actions off on submission?
  7. Hi All, Just curious how other developers handle numeric inputs. Most form inputs are limited to a "Text Field" . I've used dropdown boxes to restrict user input in some cases. Is there some trick to validating user input for: - time 7:30 AM - currency $15.00 - phone numbers (650) 691-0900
  8. Thanks Kristina, not perfect, but a workable solution (just means I have to find all the forms that submit to that table of which i have quite a few at this moment.)
  9. Hi All, i've created a Triggered Action based on insert/update to insert into an Audit_Trail_Log_tbl, but i'm stuck trying to figure out how to include the user submitting the changes. Im stuck trying to figure out how to get the data that is suppose to go into "Updated_By_User" field. I was hoping their would be an intuitive way to grab the Auth_User information. Any suggestions would be appreciated.
  10. Hi Alison, Thanks, i didnt know about the console. I thought it was a command line interface, but when i checked it showed me errors. Essentially the page couldn't load the js files due to path errors. thanks for your support!! FYI for others, see https://www.w3schools.com/html/html_filepaths.asp
  11. I'm trying to implement a responsive Navigation Menu Bar into caspio, which works great outside of Caspio, but i've learned there are some impacted areas as of Release 13.0 as it relates to javascript. I've reviewed the link about Release 13.0 Impacted Areas: https://howto.caspio.com/release-notes/caspio-bridge-13-0/13-0-impacted-areas/ and https://howto.caspio.com/datapages/ajax-loading/ Any assistance illuminating the key issue and possible solutions would be great. See below sample snippets i've isolated: [******* html code snippet *******] <div class="ico-item hidden-on-desktop"> <button type="button" class="menu-button js__menu_button fa fa-bars"></button> </div> [*******/html code snippet *******] Below i've isolated the corresponding JS code that performs the desired action. Can someone help me appreciate the reason this doesn't work when embedded in a datapage? and point me in the direction of a solution? [*******javascript code snippet *******] $(".js__menu_button").on("click", function() { $("nav").toggleClass("active"); return false; }); [*******/javascript code snippet*******]
  12. I'm trying to implement a responsive Navigation Menu Bar into caspio, which works great outside of Caspio, but i've learned there are some impacted areas as of Release 13.0 as it relates to javascript. I've reviewed the link about Release 13.0 Impacted Areas: https://howto.caspio.com/release-notes/caspio-bridge-13-0/13-0-impacted-areas/ and https://howto.caspio.com/datapages/ajax-loading/ Any assistance illuminating the key issue and possible solutions would be great. See below sample snippets i've isolated: [******* html code snippet *******] <div class="ico-item hidden-on-desktop"> <button type="button" class="menu-button js__menu_button fa fa-bars"></button> </div> [*******/html code snippet *******] Below i've isolated the corresponding JS code that performs the desired action. Can someone help me appreciate the reason this doesn't work when embedded in a datapage? and point me in the direction of a solution? [*******javascript code snippet *******] $(".js__menu_button").on("click", function() { $("nav").toggleClass("active"); return false; }); [*******/javascript code snippet*******]
  13. Hi All, We have a form that uses both external parameters [@cid] and also has a required field [@field:Bravo]. When the form loads it receives the external parameter and loads it into [@field:Alpha] successfully, but if the user doesn't fill out the required [@field:Bravo] before hitting the submit button, then the page refreshes and [@field:Alpha] loses the value. I've tried configuring both the "on load" and "on exit" of [@field:Alpha] to be the same External Parameter [@cid] thinking that after a user submits and the page refreshes due to the validation error, it would throw and catch back the [@cid] but this doesn't work. Any suggestions?
  14. What datapage did you use?
×
×
  • Create New...