Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation since 07/17/2013 in Posts

  1. JavaScript Tips: Caspio Form Elements JavaScript is a client-side scripting language that is commonly used in HTML pages. JavaScript can be used in Caspio Bridge DataPages to extend capabilities outside the standard features. This page provides a guideline for referencing Caspio form elements using JavaScript. It is an advanced topic and you should have prior knowledge of JavaScript programming. Referencing Caspio Form Elements A common way to access a form element using JavaScript is by referencing the element's ID attribute using: - document.getElementById("id")
    11 points
  2. Hi All, I had a great conversation with Caspio support a few weeks ago that helped my significantly reduce the amount of data that my app uses. Here are the cliff notes. To see how much data your pages use, paste the URL from the deploy menu into a new web browser, and use a development tool or web inspector to investigate. (in Chrome press F12, and click the Network tab) Records per page is a big factor in data usage... nearly a linear relationship. Ajax is a big load up front, but will help if you encounter many "paging" actions... long reports. Happy Building
    4 points
  3. Hello @TroubleShooter, Yes, you can. Currently, it is only possible with JavaScript. The idea is to place the Registration Form and Standalone Login Page side-by-side (or at least, in the same page). You may hide the Login Form ( using <div style="display: none;"></div> on the Header/Footer of the DataPage || More about here...), on your Registration Page but I rather keep them visible so the users can opt to just log-in if they already have an account; or register, if they don't. After registration, JavaScript will fill-out the login form,
    4 points
  4. 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 points
  5. Hello @directrix, I got this same error and contacted their support team. Then advised me that this is a Google issue as they have made changes recently. But if you have an existing task that is connected to Google Drive, it'll work perfectly. Fret not, Caspio DevOps team is now looking for a way to make this work. *winks*
    4 points
  6. Hi @bbewley, @kpcollier, You may try using this JS which should go to the Footer: <script type="text/javascript"> function formatAsDollars(el) { el.value = el.value.replace(/[^\d]/g,'').replace(/(\d\d?)$/,'$1').replace(/^0+/,'').replace( /\d{1,3}(?=(\d{3})+(?!\d))/g , "$&,"); el.value = el.value ? '$' + el.value : ''; } let fields = ["FIELD_1", "FIELD_2"]; //specify your fields here fields.forEach(element => { element = "InsertRecord" + element; // replace "InsertRecord" with "EditRecord" for Details/Single Record Update DP document.getElementById(element).onkey
    3 points
  7. Hello I want to share something with you guys again. Back then when I only have an 'explore plan', I'm using this workflow to send acknowledgement/notification emails on different persons base on a value of a field in my submission form. My workflow back then is I have a submission form for job applicants. I want to send an email to a certain member of my company depending on which position the applicant is app laying. for example. If the applicant is applying for a staff position, there will be an email an email send to staff manager, If the applicant is applying fo
    3 points
  8. Hello @IamGroot, Just wanted to inform you, I found a way to export/import a table/database with List-DataType value inside it. 1. Change the DataType to "Text(255) field" and Export it. 2. And in your Excel file, make sure that the value for the List-String field is comma separated like this: (Item1,Item2,Item3,Item4, etc.) 3. Proceed with the import as usual. After successfully importing your file. Go to your Table and to the Table Design. 4. Change the "Text(255) Field" (The one we changed in step 1) back to List-String DataType. 5. Then it will just return t
    3 points
  9. Hello @Medron, You can try this code: — Luna —
    3 points
  10. waltmayo

    Forum App?

    Has anyone out there developed a user forum system? I didn't see one offered as a Caspio ready-made-app. If anyone has a good one they'd like to make available, I'd be happy to help support your efforts ($$). If not... I may take this on myself, but I didn't want to re-invent the wheel. Walt
    3 points
  11. I thought this might be helpful across the board for people developing in Caspio. I've been trying to do a better UI for data entry on web pages that also have to show results in a tabular report. Since iframes don't reliably pass parameters from parent to child and back it's necessary to sometimes deploy 2 datapages (a Submit or Details and a Tabular) on the same web page. This doesn't really look good from a UI perspective. This solution requires using bootstrap and jquery but it's fairly straightforward. One option is to put the the Submit/Details deploy code in the first
    3 points
  12. 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) +
    3 points
  13. Hello everyone, I have found a solution, but it requires additional steps. Select the field with id or with any unique value, on the Advanced tab, select the Pass field value as parameter checkbox and copy the name of the parameter (for example, "[@id]"). Add a Virtual field, select the Hidden Form element, select the External Parameters "On load, receive", paste the name of the parameter from step 1 (for example, "[@id]"). Add the second Virtual field, select the Hidden Form element, select the Data Source Field "On load, receive", select the field with id or with any unique value, th
    3 points
  14. MayMusic

    Field Length

    This is possible by setting fixed width for results page label and data elements in the style. To do so, follow the steps below: 1- Edit the Style and enable "Show advanced options (CSS Source)" 2- Move on to the Settings screen and expand Results Page 3- Select Label, switch to Source tab and find ".cbResultSetLabel". Add the following: display: inline-block; width: 70px; 4- Select Data and find ".cbResultSetData". Add the following: display: inline-block; width: 100px; You can play with the width number to get the best fit for your page. NOTE: inline-block style should NOT
    3 points
  15. Hi @MaraMara, To move your "Record Action buttons column" to the first column you may follow the next steps: 1. Go to Styles and open the styles that you are using for the DataPage 2. Select Table Layout under Results Page 3. Under Element Type, look for Record Action Column 4. On the Position dropdown, change the position to Left. 5. Click Save then go to your DataPage then apply this Style Hope this helps!
    2 points
  16. Just leaving this here ... <script> document.addEventListener('DataPageReady', function(event) { function hideControlsForPerson() { var table = typeof document.getElementsByClassName("cbResultSetTable" + event.detail.uniqueSuffix)[0] == "undefined" ? document.getElementsByClassName("cbResultSetTable")[0] : document.getElementsByClassName("cbResultSetTable" + event.detail.uniqueSuffix)[0]; // Find the index of the last column, which happens to be the inline edit/delete var total_num_columns = table.rows[0].cells.length; var controlsCo
    2 points
  17. An Agent from Chat support gave me this doc. Its not official but I hope it helps quack: Table Variables .pdf
    2 points
  18. Hello @CoopperBackpack You may use additional JS code to implement this workflow: <script type="text/javascript"> document.addEventListener('DataPageReady', fileInputEvent) function fileInputEvent() { document.querySelector("#InsertRecordFile_f"),addEventListener('change', fileInputHandler); // use the InsertRecord[your file field name] instead document.removeEventListener('DataPageReady', fileInputEvent) } function fileInputHandler(event) { const fileSizeInput = document.querySelector('#InsertRecordFile_size'); // use the InsertRecord[your file size field name] instead fi
    2 points
  19. 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>
    2 points
  20. Hi @Johnn, You can use FormSubmitted event handler. I saw it in the howto article: https://howto.caspio.com/datapages/ajax-loading/ <script type="text/javascript"> document.addEventListener('FormSubmitted', function(event) { alert('Submitted'); }); </script>
    2 points
  21. Please ensure that you don't have referential integrity enabled in you table relationship. According to the note in https://howto.caspio.com/tables-and-views/triggered-actions/:
    2 points
  22. Hi @roattw If this is a submission form I assume you mean something like this; Where you can have headings over each section? If so you can split the form up into sections with columns to suit and have HTML block in-between their own sections set at 1 column to span the page like this; This is one column proceeded by the HTML block with the next section containing the submission form fields; You will have to experiment (a lot!) to get decent results and spacing for your whole form as if you start mixing section columns other then 1 and X (in my case X
    2 points
  23. You can use the code below as a reference. <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { var c_checkbox = document.getElementById("selectAll") ; var elementID = event.detail.uniqueSuffix; function c_event () { if (c_checkbox.checked) { var listBox = document.getElementById('Value1_1' + elementID); for (i = 0; i < listBox.options.length; i++) listBox.options[i].selected = true; } else { var listBox = document.getElementById('Value1_1' + elementID); for (i = 0; i < listBox.options.le
    2 points
  24. Hello Batchini! Well, there would be two ways how to create this. If we're going to use trigger, this may be a complex one. One easy way I thought of is with the use of Calculated Fields, but this would only be on a DataPage Level. You can use this formula to get the Minimum Value. SELECT MIN(FieldName) FROM Child WHERE ID = target.[@field:FieldID] Assuming if you have a foreign Key inside your child table. So we'll be using this formula to display the minimum value, Datasource would be your parent table. I hope this helps. Scar();
    2 points
  25. Hello @TroubleShooter, The reason why the ampersand symbol is being cut is because Caspio renders the link literally. In this example: <a href="https://www.google.com?myParameter=[@field:someField]"> Link </a> If "someField" evaluates to "Some Value & Another Value" then the mark-up would result to <a href="https://www.google.com?myParameter=Some Value & Another Value"> Link </a> This is when urlencoding comes into play. What this does is substitutes the special characters in a standard HTML format which interprets charac
    2 points
  26. I suggest using Print.js. With Print.js you can target the specific id of the element that you wanted to print out as a PDF. More info on the link here: https://printjs.crabbly.com/
    2 points
  27. Hi @philippe, You can use Javascript for this. First, you need to pass the parameter from the search form. Then inside your Results Page, add a Header and Footer. Put this code inside your footer (make sure to disable HTML Editor) <script> // Replace Value to Parameter name var passID = '[@Name]'; // Replace Value to the Field Name of Event ID inside table var this_field= 'Name'; var insert_field = document.querySelector('form[action*="[@cbAppKey]"] #InlineAdd' + this_field); insert_field.value = passID; </script> Just a little something
    2 points
  28. Sorry for all the questions, I do search/read the topics and forum for help before posting! How would I use a single form submission to enter data into two different tables at the same time? For example, user adds a customer of his, which then creates an entry in the "Clients" table (because it is new), and also creates an entry in the"Sales_Coverage" table to create an association between him (Person) and that Client. It would be impractical to have a user enter this info into two different forms. Thank you in advance, Chris
    2 points
  29. It is possible to set checkmark condition using Calculated Value. The field should be set as Calculated Value The basic formula to set the condition is: CASE WHEN [@field:IntegerValue]=100 THEN 'X' ELSE 'Y' END For Yes/No field, the boolean value us 1/0. However, to make it work properly, the field should receive BIT value. So, CAST function should be applied: CASE WHEN [@field:IntegerValue]=100 THEN CAST(1 as bit) ELSE CAST(0 as bit) END
    2 points
  30. SunakoChan

    Tooltip

    Hi @telly, This is doable, you just need to add <image src="IMAGEURL"> on your hint. Sample Result Bellow:
    2 points
  31. AlexH

    Automated Email on date

    Hello all, I have been playing around with Caspio and really like what I see! I have several potential projects in mind, but I want to ask about two features I haven't been able to find/figure out. 1) The database will contain information including fields for email address and an expiration date. I would like to automate a process to send an automated email to the email address specified in the record at the 30 day mark prior to the expiration date in the record. The email will contain a link on how to submit a new record. 2) Can I send an automated email with a link to som
    2 points
  32. Just to add to the previous comment, I just noticed this recently, When a Field for Birthdate is equal to, say December 2018, and it is now January 2019, using "Datediff(Year,[@field:Birthday],GetUTCDate())" as a formula would give me a "1 year" as result, when in fact it should not. I guess it's because I used "Year" as the DateDiff option. What I did was "Datediff(Month,[@field:Birthday],GetUTCDate())/12", it did somehow responds to the age correctly, but when my birth month comes, it adds to my age. I can accept that tho. So just in case someone encounter the same problem, I ho
    2 points
  33. I found a way to do it by adding a small function to the javascript to decode html entities: <script> function decodeEntities(encodedString) { var textArea = document.createElement('textarea'); textArea.innerHTML = encodedString; return textArea.value; } // Replace [@authfield:name] accordingly with the parameter or custom value you wish. var paramValue = '[@XC_Organization]'; // Replace with the name of your field as described in your DataSource var field_name = 'XC_Organization'; /* Edits are not necessary for this part */ var i_field = do
    2 points
  34. Hello Azriel. I have similar validation in my App, I have used the JavaScript below to implement this validation. <script type= "text/javascript" > var input1 = document.querySelector('#InsertRecordValue1'); var input2 = document.querySelector('#InsertRecordValue2'); var input3 = document.querySelector('#InsertRecordValue3'); var input4 = document.querySelector('#InsertRecordValue4'); document.querySelector('#caspioform').onsubmit = function(e) { e.preventDefault(); if (input1.value.length > 0){ this.submit(); } else if (input2.value.length >
    2 points
  35. Hi, Yes, it is possible to Caspio. Caspio apps may be deployed to Facebook in two ways: 1. Canvas Page - This is your DataPage loaded as a Facebook standalone app. 2. Page tab - This is your DataPage deployment that is accessible directly from your business profile page. You can refer to this link for reference: https://howto.caspio.com/tech-tips-and-articles/social-media/create-facebook-apps-and-page-tabs-with-caspio-datapages/
    2 points
  36. Hi @roattw, You can implement the solution from this topic . 1. Disable AJAX loading of Datapage; 2. Place the following code into Datapage Header: <style> .wrapper1, .wrapper2 { width: 100%; overflow-x: scroll; overflow-y: hidden; } .wrapper1 { height: 20px; } .wrapper2 {} .div1 { height: 20px; } .div2 { overflow: none; } </style> <script src="https://code.jquery.com/jquery-1.9.1.js"></script> <div class="wrapper1"> <div class="div1"></div> </div> <div class="wrapper2"> <div class="div2"> 3. Place the followin
    2 points
  37. Hi Corpcat, You can just redeploy your DataPages, new deployment codes with the updated Caspio Site URL will be generated. And for the passing of parameters, the process is still the same. It should look like this: <iframe frameborder=0 style="width:100%; height:700px" name="Document_Entry Web Form_New" title="Document_Entry Web Form_New" src="https://c0eib342.caspio.com/dp/aabb20003c459fa6fab94c8dbe01?Grace_Bar_Code=[@Grace_Barcode_No]&Recal_Box_No=[@Recal_Box_No]">Sorry, but your browser does not support frames.</iframe> Hope this helps. -Jolli
    2 points
  38. @abitaquest, There's a possibility that the reason it's not working now is because of the recent Caspio update. Event like onsubmit will no longer be supported and you need to use Caspio's built-in event handlers. Kindly please check the link below for more information: https://howto.caspio.com/release-notes/caspio-bridge-13-0/13-0-impacted-areas/ https://howto.caspio.com/datapages/ajax-loading/ I hope this helps.
    2 points
  39. I'm so excited. I found a way to make it work even if AJAX Loading is enabled. Luckily, I came across Caspio 13 Impacted Areas and kudos to good guy Caspio making this AJAX Implementation customizable. previous post TL:DR? Follow this instead. To make this work: 1.) Gey an API key here. Enable access to your domains (Website, Caspio URL and Integration URL) (You can see the last two in your Caspio Bridge > Account > Account Settings). 2.) Create/Edit your Submission Form DataPage 3.) Make sure 'Disable AJAX loading' remains UNCHECKED in the Dat
    2 points
  40. Base all of your dropdowns on a lookup table This technique requires using a lookup table as the base reference for your dropdowns. Lookup table based dropdowns have several advantages over using custom values. If you do not currently use a lookup table you can find steps to create one here. Create a Submission Form to your lookup table First, we are going to create a Submission Form DataPage so users can submit new records directly to the lookup table. Click New DataPage. By default, the cursor selects Submission Form as the first DataPage type. Click Next.
    2 points
  41. Got an answer to my question (Thanks so much Francis!) I got confirmation that the "Social Login Field" is not the same as the account name or the email address. For example, the Google social login field is a text string that resembles the following: "Google:123456789012345678901" Where it's the word "Google:" followed by a 21-digit number that uniquely identifies the Google account. There is a specific set of steps necessary to obtain that information which is not yet documented on the Caspio Support site. As soon as I have a chance I will append the instructions here in case
    2 points
  42. Wow...that worked. I could've sworn that I had tried this already.... but I may have put the [0] in the wrong place. Thank you!!!!!!!!!!!!!!!!!!!!!
    2 points
  43. Hi Adam, You could add a new field "Date_filter" of Formula data type to your table and use the following function: Dateadd(hour,24,[@field:timestamp]) Replace [@field:timestamp] with the name of your field that holds date/time of original submission. In the pre-defined criteria report, on Select Filtering Fields screen, move "Date_filter" to Selected Fields area. On the Configure Filtering Fields screen click on the "Date_filter" field and choose "Before Now" as comparison type. Hope this helps. Ariel
    2 points
  44. Well guys, it seems that Caspio has been listening to our concerns regarding the cost of data transfer. By pure chance I've just revisited the pricing section of the website and discovered that their pricing plans and content have been updated. It appears that Caspio is sensibly giving much more help to the smaller guys, while loading the higher fees on to the larger companies. Data transfer is now "unmetered" from the professional plan upwards. I'm assuming that "unmetered" means 'free', although I'm not sure why they don't just say "free". I hope it's just semantics and that I'm bein
    2 points
  45. Hi bwe, Just wrap deploy code of your Datapage between div tag and set align attribute. <!DOCTYPE html> <html> <body> <div align="center"> deploy Caspio code here </div> </body> </html> Matilda
    2 points
  46. Hi Jan, I think, you can add this code to the Footer (do not forget clicking the Source button and changing FIELDNAME to the name of your field): <SCRIPT LANGUAGE="JavaScript"> var myDate = new Date(); myDate.setFullYear(myDate.getFullYear()+1); var myMonth = myDate.getMonth() + 1; if (myMonth<10) {myMonth = "0" + myMonth;} var myDay = myDate.getDate(); if (myDay<10) {myDay = "0" + myDay;} var myYear = myDate.getFullYear(); var result = myDay + "." + myMonth + "." + myYear; document.getElementById("InsertRecordFIELDNAME").value=re
    2 points
  47. Elena, Is this what you are looking for? http://howto.caspio.com/tech-tips-and-articles/common-customizations/how-to-add-a-reset-button-to-clear-a-form/ For example: http://b6.caspio.com/dp.asp?AppKey=85b33000a5818c495ed349b9b7c9 Cooper
    2 points
  48. Hi Rael, I think, you can double the code for all listboxes, like: <script type="text/javascript"> var fieldName = "cbParamVirtual1"; var fieldName2 = "cbParamVirtual21"; var x1=document.getElementsByName(fieldName); var x2=document.getElementsByName(fieldName2); x1[0].multiple=true; x2[0].multiple=true; function splitAndParse() { var result = ""; var result2 = ""; var cleanResult = ""; var cleanResult2 = ""; for (var i = 0; i < x1[0].length; i++) { if (x1[0].options[i].selected) { result += "\""+x1[0].options[i].value+"\"" + " OR " ; } } if (x1[0].length > 4) {
    2 points
  49. perland

    Print Button

    If you just want to print the <form id="caspioform" ... a simple way will be to create a footer in your report form and copy the code below. <input type="button" onclick="printDiv('caspioform')" value="Print caspioform" /> <script> function printDiv(divName) { var printContents = document.getElementById(divName).innerHTML; var originalContents = document.body.innerHTML; document.body.innerHTML = printContents; window.print(); document.body.innerHTML = originalContents; } </script> VK.
    2 points
  50. drc

    multipage web form

    John: I followed your directions and that worked. My multipage form question is a bit different: - I don't need the 2nd page of the form to be authenticated. My new member registration includes 3 pages: 1) Page 1: general account and user info form 2) Page 2: additional fields if user elects to upgrade membership (the user shouldn't have to log in to access this form 3) Page 3: preview page, which should include all the field data from Page 1 AND -- if the user enters data on Page 2 -- all of the field data from Page 2. On Page 3 the user will be presented with two buttons: Back (t
    2 points
×
×
  • Create New...