Jump to content


Caspio Ninja
  • Content Count

  • Joined

  • Last visited

  • Days Won


Nuke354 last won the day on July 6

Nuke354 had the most liked content!

1 Follower

About Nuke354

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. This will need Javascript customization to alert users when they leave an incomplete form. Here's stackoverflow discussions about it: https://stackoverflow.com/questions/11844256/alert-for-unsaved-changes-in-form https://stackoverflow.com/questions/7317273/warn-user-before-leaving-web-page-with-unsaved-changes
  2. To further visualize, here's a sample Task
  3. Hi there. May I know more on the how you're adding the SQL query in your pivot table? Have you also tried to use a Tabular Report and insert a Calculated Value instead?
  4. You may use JS to force change the options. Here's how, I used the Lost and Found RMA based from your example: Here's the code that you can use: To remove the option entirely: <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { document.querySelector("#asorting > option:nth-child(1)").remove(); }); </script> To set a default blank value: <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { document.querySelector("#asorting > option:nth-child(1)").innerHTML = "Default"; }); </script> Hope this helps!
  5. <script> var v_dpTotalCount = 2; var v_dpCounter = 0; </script> <!-- DEPLOY CODES HERE--> <script> document.addEventListener('DataPageReady', function (v_e) {try{document.getElementsByName('cb-auth-box')[v_dpCounter].parentNode.parentNode.style.display="none";} catch(v_e){} v_dpCounter +=1; if( v_dpTotalCount <= v_dpCounter) {if(document.getElementsByName("cb-auth-box")) {var v_box = document.getElementsByName("cb-auth-box").length-1 ; for (i=0; i < v_box; i++) { document.getElementsByName("cb-auth-box")[i].parentNode.parentNode.style.display="none" ; } try{document.getElementsByName("cb-auth-box")[v_box].parentNode.parentNode.style.display="";}catch(v_e){ console.log("Error"); } } } }); </script> I have tried this one as a workaround for responsive pages. I just changed .style.display = "none" to .parentNode.parentNode.style.display="none" Hope this helps!
  6. As a workaround, we can use a Formula field in our table to replace the string line breaks with HTMl <br> tag so it can be rendered via HTML. Replace([@field:WithNewLine], ' ', '<br>') Once we have the HTML Version of the text, we can render it as HTML in our Reports: If doing via HTML Block with scripts, just insert it as HTML: Hope this helps!
  7. Hi, I have found documentation for the Signature Pad Library regarding resizing the signature based on the device's viewport. https://github.com/szimek/signature_pad#handling-high-dpi-screens Here's a discussion about it: https://stackoverflow.com/questions/51711627/signature-pad-on-mobile-draws-a-distance-of-several-centimeters-along-the-x-and So on Caspio, I have tried this code snippet: <script type="text/javascript"> $(document).ready(function () { $('#caspioform').signaturePad({drawOnly : true}); // window.addEventListener("resize", resizeCanvas); resizeCanvas(); }); $("#cb_sign_wrapper form").submit(function(){ $("#EditRecordSignature")[0].value = $("#cb_sign_wrapper .output")[0].value; }); function resizeCanvas() { var canvas = document.querySelector(".pad"); var ratio = Math.max(window.devicePixelRatio || 1, 1); canvas.width = canvas.offsetWidth * ratio; canvas.height = canvas.offsetHeight * ratio; canvas.getContext("2d").scale(ratio, ratio); var ctx = canvas.getContext("2d"); ctx.clearRect(0, 0, canvas.width, canvas.height); } </script> This should adjust the signature pad on first load on mobile.
  8. This links might give you an idea on how it can be done by adding a required pattern attribute to your text fields. https://stackoverflow.com/questions/39343696/jquery-fiscal-code-validation https://stackoverflow.com/questions/39592208/dynamically-adding-pattern-and-title-attributes-to-input-control Here's an example that you can test in an HTML Block w/ Header and Footer for the styles: <div>FISCAL ID: <input type="text" name="name" required pattern="[A-Z]{6}\d{2}[A-E,H,L,M,P,R,S,T]{1}\d{2}[A-Z]{1}\d{3}[A-Z]{1}" /></div> <style> input:required:invalid {background-color: lightcoral;} input:required:valid {background-color: lightgreen;} </style> With this knowledge, you can select the Caspio text field and use: .setAttribute("pattern","[A-Z]{6}\\d{2}[A-E,H,L,M,P,R,S,T]{1}\\d{2}[A-Z]{1}\\d{3}[A-Z]{1}");
  9. 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>
  10. @Roosta You can try this code if you want color a column color without any criteria. This method makes the PDF generator recognize the color change. You can check out the DataPage again here: https://c0dcd456.caspio.com/dp/ad9b7000d75f22b3a5474682b6db <script> var isi = document.getElementById('visi[@field:ID]').parentNode.parentNode; if('[@field:Sales#]' > 500){ isi.querySelector('td:nth-child(4)').style.backgroundColor = '#A1DE93'; } else{ isi.querySelector('td:nth-child(4)').style.backgroundColor = 'red'; } // Force change color isi.querySelector('td:nth-child(5)').style.backgroundColor = 'blue'; </script>
  11. @Roosta Yes, this is definitely doable, you just need to determine the child row of a certain column to change the color. Since there are no criteria you can omit the IF and ELSE statements. Like this: isi.querySelector('td:nth-child(<column_number>)').style.backgroundColor = 'red'; To find the child no. just press F11 to Inspect Element on Google Chrome then copy paste the selector.
  12. You can also put this in your Footer if you are using calculated fields to manipulate the styles: <script> document.querySelectorAll(`[action*="[@cbAppKey]"] .cbResultSetCalculatedField`).forEach(function(elem) { if(elem.innerHTML == "Not Available") elem.style.color = "red"; }) </script>
  13. You can do that using the new Do- While in the table triggers. The firs thing you need to do is to get the difference between days of the two Dates using a variable, Then, using this variable you can iterate the insertion in your dummy table where the range of dates will be marked on the calendar. You can put an identifier field so that these dates are grouped based different criterias (ID's, Authentications). You can check out this trigger for reference:
  14. You should create a header and footer and we will add a CSS style to modify the "View Details"'s position. Here's the code: <style> .cbResultSetPanelColumnarRAContainer:hover { margin-top: -[height here] !important; } .cbResultSetPanelColumnarRAContainer { margin-top: -[height here]px !important; } </style> You may have to adjust depending on the height of each item. Hope this helps.
  15. You should set the number of records in results page to 1 and define sort order by timestamp field in Search Results Options of a Report DataPage. Choose List Report type if you prefer list layout versus tabular. If you desire the Details page format then enable Details page and checkbox "Always skip results page when only one record found". Steps are listed below: 1) Create a tabular (or list depending on the desired look) report DataPage 2) Enable Advanced Options and Parameters 3) Navigate to Search Results Options 4) Change the default sort order to timestamp field from the dropdown (make is Z to A) 5) Change Records per page to 1 6) Go to Advanced tab, select radio button for total records returned and type 1 Follow next steps if you want Details page: 7) Enable Details page and check box for "Always skip results page when only one record found" 8) Select any field in the details page and click Finish
  • Create New...