Jump to content

DavidBRX

Caspio Ninja
  • Posts

    31
  • Joined

  • Last visited

  • Days Won

    4

Reputation Activity

  1. Like
    DavidBRX got a reaction from CoopperBackpack in Pop-up notice when value is changed using drop-down menu   
    Figured it out guys. Thank you much for this most valued and helpful assistance. How on earth you guys know this coding stuff is beyound me, it makes my brain melt! :-)
    Thank you again, it works like a charm!! % STARS!!
    Best,
    David

  2. Like
    DavidBRX reacted to Barry in UserName Stamp   
    Hello,
    One feature that I can think of to achieve that is using the authentication fields. So in the update and sumbission DataPages I would create a hidden field that loads the username who is authenticated and save it in the table, then I would use that field from the table to display the "Last updated by:"
    Like in the following article https://howto.caspio.com/authentications-and-connections/authentication/stamp-a-record-with-user-profile-data/
  3. Thanks
    DavidBRX got a reaction from kpcollier in Pop-up notice when value is changed using drop-down menu   
    Figured it out guys. Thank you much for this most valued and helpful assistance. How on earth you guys know this coding stuff is beyound me, it makes my brain melt! :-)
    Thank you again, it works like a charm!! % STARS!!
    Best,
    David

  4. Like
    DavidBRX reacted to kpcollier in Pop-up notice when value is changed using drop-down menu   
    Try something like this:
    document.getElementById("status").addEventListener('change', function(){ alert("Dropdown value changed to: " + document.getElementById("status").value); }) One thing to note is that you'll want to double check to make sure your dropdown's ID is really 'status'. If this is a dropdown that you created using HTML, and you actually gave it an ID of status, then you should be fine. But, if this is a Caspio element, it is most likely not the correct ID.
    When previewing the datapage with the dropdown, right click and select 'Inspect'. This will pull up the devtools. Then, click on the icon with an arrow pointing at a dashed box on the top left corner of devtools. This will let you select an element. Finally, click on the dropdown itself. This will pull up the dropdown element on devtools and will show you the ID you need to use. It is most likely going to be 'EditRecordstatus' or 'InsertRecordstatus', if the name of your dropdown is status.
    Or, you could just try getting the ID yourself. If this is a submission form, use 'InsertRecord' + the table name of your dropdown field. If it is an Update Form or Details page, then use 'EditRecord' + the table name of your dropdown. If your dropdown is cascading, then we will need to make some changes to the script.
  5. Like
    DavidBRX reacted to CoopperBackpack in Pop-up notice when value is changed using drop-down menu   
    Hello @DavidBRX,
    As for me, I don`t like basic browser alerts.
    You can utilize the 'sweetalert' popup boxes.
    This code should work on the Submission form if you add it in the Footer:
    <script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script> <script> document.addEventListener('DataPageReady', notificationHandler) function notificationHandler(){ const statusField = document.getElementById("InsertRecordstatus"); statusField.addEventListener("change", function(event) { const statusFieldValue = event.target.value; Swal.fire( '', `Dropdown value changed to: ${statusFieldValue}`, 'info' ); }) document.removeEventListener('DataPageReady', notificationHandler) } </script>
     
    For the Details page just change the dropdown ID:
     const statusField = document.getElementById("EditRecordstatus");
     
    Please note that for the Cascading Dropdown, the ID is slightly different as mentioned in the previous post. 
  6. Like
    DavidBRX got a reaction from CoopperBackpack in Formatting a numbers field   
    This worked awesomely! 
    Thank you sooooooo much for your expertise and valued assistance.
    David
  7. Like
    DavidBRX got a reaction from Tubby in Red Font for > than Value   
    Hello Tubby,
     
    You're absolutely AMAZING!  Thank you sooooo much for your time and expertise on this.
    Ironically, for some odd reason (unknown to me), I removed the # symbol wherever referenced, and this seems to have fixed it. It now calculates all the figures correctly (see attached). Of course I welcome your feedback on why this happened so I can hopefully understand what happened behind the scene when I removed the # from the code.  My brain is melting now.
  8. Like
    DavidBRX got a reaction from Tubby in Red Font for > than Value   
    Wait!  I removed the # symbol from the following code and that seems to have solved it.
     
    <div id="visi[@field:number#]"></div>
    <script>
    var isi = document.getElementById("visi[@field:number#]");
    if([@field:impervious] > [@calcfield:1]){
    isi.parentNode.parentNode.querySelector("td:nth-child(8)").style.color="red";
    }
    else{
    isi.parentNode.parentNode.querySelector("td:nth-child(8)").style.color="black";
    }
    </script>
  9. Like
    DavidBRX got a reaction from Tubby in Red Font for > than Value   
    Oh my
    Let me give this a try. How you guys know this stuff is beyond me.  It's soooooo confusing to me.
    Thank you Tubby, I'll cut and paste your code and attempt to edit it as you have suggested. 
×
×
  • Create New...