Jump to content


Popular Content

Showing content with the highest reputation since 07/01/2020 in all areas

  1. 1 point
    Hi @CoopperBackpack Hope you are well. Here is the code that would let you to achieve the result. You should insert it in your HTML block. And I will explain the code below. Please be aware, that I used Virtual Field for this example with name "cbParamVirtual1" as a Calculated Value, since in Caspio virtual field has syntax [@cbParamVirtual1]. You can put there your own field name if needed instead of "cbParamVirtual1" <div class="message"></div> <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { document.querySelector('input[id*="cbParamVirtual1"]').addEventListener("change", myFunction); function myFunction(event) { let virField = event.target.value; document.querySelector('.message').innerHTML = "your text should be here " + virField; document.removeEventListener('DataPageReady', myFunction); } }); </script> This is the part where you insert text, added by JS code:: <div class="message"></div> The JS code has place, where you should enter the text you want to have in HTML block. Here is this part, replace "your text should be here " for the one you need. document.querySelector('.message').innerHTML = "your text should be here " + virField; Hope it helps. Regards, Johnny
  2. 1 point
    Hello @vanderLeest, Please try this code: <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { let title = document.querySelector('#cbParamVirtual2').value; let title1 = document.querySelector('#cbParamVirtual3').value; if (title == title1) { document.querySelector('h4').innerHTML="Add your Invoice"; } else { document.querySelector('h4').innerHTML="Add your Invoice and the Financial Statement Report"; } }); </script> The code should work properly if: 1) you have only one <h4> tag on the DataPage 2) Virtual2 and Virtual3 values are present on the DataPage once it is loaded. Feel free to write back in case you have additional questions.
  3. 1 point

    Datapage Tabular Report Row Click Event

    The rows in a tabular datapage report display colors when they are clicked to highlight the chosen row. Is the event for this exposed so I can attach a javascript event listener and extract data from the selected row ?
  4. 1 point
    You may use the code below to hide fields in the new responsive feature <table style = "display:none;"> <tr> <td> FieldA FieldB </td> </tr> </table>
  • Create New...