Jump to content

kdezign7

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by kdezign7

  1. Hi, Is it possible to modify this script to work with radio buttons. I created a datapage and certain fields need to show if a certain radio button is selected. This script looks like it would work but I don't have the skills in javascript to modify with Caspio Radio buttons . Help will be appreciated, Thank you, kdezign7 Hello @roattw, Once the field is being hidden using rules and this specific field has default value, the value itself will not be stored inside the table once submitted since it is hidden and considered as non existing field. If you want to achieve your current workflow, you may need a JavaScript code that will hide a field based on a checkbox. If you are familiar with Javascript, you may use the code below, paste it in the Footer and play around with it: <script> document.addEventListener("DataPageReady", function() { field = document.querySelector('input[id^="InsertRecordName"]'); label = document.querySelector('label[for*="InsertRecordName"]'); if (document.getElementById("cbParamVirtual1").checked) { field.style.display = "inline"; label.style.display = "inline"; } else { field.style.display = "none"; label.style.display = "none"; } document.getElementById("cbParamVirtual1").onclick = function() { if (document.getElementById("cbParamVirtual1").checked) { field.style.display = "inline"; label.style.display = "inline"; } else { field.style.display = "none"; label.style.display = "none"; }}}); </script> The code above will hide the field if the checkbox is not checked. You can modify the code and change the IDs assigned to it based on the ID of your field inside your DataPage. I hope this works on you end. Regards, Barbie
  2. Hi, How would I change this code to work with Radio buttons. I have tried rules to hide field but no luck. Please help? Katherine
  3. Thank you for the response. Here is the link: https://c0abn413.caspio.com/dp/4559500018b74f26c8634bb381ae
  4. Hi, I added this script to my tabular report datapage and it works in Chrome but not in Safari browser. Any suggestions?
×
×
  • Create New...