Jump to content


Popular Content

Showing most liked content since 12/16/2017 in all areas

  1. 1 point

    2 functions in a script one works

    You are not calling the second function at all but you call the first one two time. You to change the last line to: document.getElementById("caspioform").onsubmit=calculate2;
  2. 1 point
    If you send some words separated with OR like : John OR Mike and then in your report page receive this value and comparison type should be CONTAINS You need to separate your search and report in two page: https://howto.caspio.com/tech-tips-and-articles/tech-parameters/how-to-separate-search-page-and-results-page-into-two-different-webpages/ Then in the search page add a JS to the Footer of the page to replace the spaces you have on search field with OR. <script> function rep(){ var str= document.getElementById('cbParamVirtual1').value; document.getElementById('cbParamVirtual1').value =str.replace (/ /g, ' OR '); } document.getElementById('Submit').onmouseover = rep; </script> Virtual 1 if the virtual field you added to your search page and you need to check the value to the next page on submit.
  3. 1 point
    Hello All, I just wanted to share this link with everyone in case you are looking to create a quick PDF from a DataPage: http://pdfcrowd.com/save-to-pdf/ You can simply add this line of code to create a link to generate a PDF: <a href="//pdfcrowd.com/url_to_pdf/">Save to PDF</a> Just wanted to share this with everyone!
  4. 1 point
    You to check to pass AutoNumber or any Auto generated values from submission page as follow Then on the next page you can receive these values in this format: [@InsertRecordFIELDNAME] FIELDNAME is the name of the field in your table.
  5. 1 point
    Hi ChristineM, I suppose that you have forgotten to press "Source" button in HTML editor before inserting the code. The issue described in this article: https://howto.caspio.com/faq/caspio-bridge-8-4/inserting-code-in-html-blocks-and-header-footer/ Regards, Vitalikssssss
  6. 1 point

    Remove "Data Table" tooltip

    I have not tried the code but syntax needs a little modification: <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> <script> $(document).ready(function(){ $("table[data-cb-name='cbTable']").removeAttr("title"); }); </script>
  7. 1 point
    Hi everyone, I have revised the initial Javascript solution so it could meet the requirements of recent Asynchronous deployment method which do not support window.onload() event. <iframe id="iframe_pdf" style="width:80%; height: 1100px; display: none;" align="middle" frameborder="0"></iframe> <script> document.addEventListener('DataPageReady', function (event){ if(!("[@field:Document/]" == "")){ embed_pdf(); } }); function embed_pdf(){ var google_link= "https://docs.google.com/gview?url="; var google_param = "&embedded=true"; var pdf_link = "[@field:Document/]"; var encoded_pdf_link = encodeURIComponent(pdf_link); var iframe_window = document.getElementById("iframe_pdf"); iframe_window.style.display = "block"; iframe_window.src=google_link + encoded_pdf_link + google_param; } </script>
  8. 1 point
    If your WO_Num field is a unique id of the records in the report, try the following... <div id="linkto[@field:WO_Num]"></div> document.getElementById("linkto[@field:WO_Num]").innerHTML = blah blah blah I have traditionally done this to ensure each div has a unique id, and it works with the Asynchronous deployment method ... However I am finding it does not to work any more in a DataPage Header (with the Asynchronous deployment method) EDIT: I have only found this to work if the innerHTML statement is placed after the Header Element of the DataPage (ie. in a subsequent HTML Block), but then it is called for every record when the content is only in my report heading)
  9. 1 point

    Any Programmers for Hire

    Working with Chad (ezIQ) was effortless and an absolute pleasure. I asked him to figure out a few custom solutions for my Caspio project, and he quickly provided javascript solutions that have functioned beyond my expectations. His code is well organized and includes plenty of comments for the novice, such as myself. I highly recommend his services and look forward to future projects.
  10. 1 point

    PLugin error with Caspio deploy

    Hi Try adding <?php session_start(); ?> at the beginning of the "class-datapage-loader.php" file. Also, please remove any trailing spaces at the beginning of that file. You may find more details here
  11. 1 point
    In this case you may use java script. I created a simple example for you, you should paste script in the footer of the datapage: <script> window.onload = function myFunction() { var d = new Date(); var weekday = new Array(7); weekday[0] = "Sunday"; weekday[1] = "Monday"; weekday[2] = "Tuesday"; weekday[3] = "Wednesday"; weekday[4] = "Thursday"; weekday[5] = "Friday"; weekday[6] = "Saturday"; var n = weekday[d.getDay()]; document.getElementById("InsertRecordField_name").value = n; } </script> Enter name of your field instead of: Field_name
  12. 1 point

    Calculate Week Number in Formula Field

    Hi NeoInJS, Please try using this formula: FLOOR( ( DATEDIFF(day, CONVERT(datetime, CAST(DATEPART(year, [@field:Start_Time]) AS CHAR(4)) + '-01-01', 101), [@field:Start_Time]) + ( 7 - ( ( ( ( DATEPART(day, [@field:Start_Time]) + FLOOR(13 * ((CASE WHEN DATEPART(month, [@field:Start_Time]) < 3 THEN DATEPART(month, [@field:Start_Time]) + 12 ELSE DATEPART(month, [@field:Start_Time]) END) + 1) / 5) + ((CASE WHEN DATEPART(month, [@field:Start_Time]) < 3 THEN DATEPART(year, [@field:Start_Time]) - 1 ELSE DATEPART(year, [@field:Start_Time]) END) % 100) + FLOOR(((CASE WHEN DATEPART(month, [@field:Start_Time]) < 3 THEN DATEPART(year, [@field:Start_Time]) - 1 ELSE DATEPART(year, [@field:Start_Time]) END) % 100) / 4) + FLOOR((CASE WHEN DATEPART(month, [@field:Start_Time]) < 3 THEN DATEPART(year, [@field:Start_Time]) - 1 ELSE DATEPART(year, [@field:Start_Time]) END) / 400) + 5 * ((CASE WHEN DATEPART(month, [@field:Start_Time]) < 3 THEN DATEPART(year, [@field:Start_Time]) - 1 ELSE DATEPART(year, [@field:Start_Time]) END) / 100) ) % 7 ) + 6 ) % 7 + 1 ) ) ) / 7 ) + 1 NOTES: You must replace all instances of [@field:Start_Time] with your actual field. You can test for correctness by adding a calculated field that uses DATEPART(week, [@field:Start_Time]).