Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 08/18/2018 in all areas

  1. 2 points
    IMDora

    JS Date Restrictions Quit Working

    @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. 1 point
    LunaLovegood

    Connect to Google Drive

    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*
  3. 1 point
    IamGroot

    Pop-up Form on Submit

    Hi @Perzival, You can create another DataPage and add HTML Block with the linked of the user confirmation, here some sample code for pop-up form: For you to better understand the process, you can go through Caspio's How-to: https://howto.caspio.com/tech-tips-and-articles/advanced-customizations/add-an-option-to-a-public-facing-dropdown/ https://howto.caspio.com/tech-tips-and-articles/common-customizations/how-to-add-a-required-i-agree-option-to-your-form/ I hope this helps you
  4. 1 point
    Hello everyone, Is it possible in Caspio to remove the "No record found" message in results page? Instead, I want to display a button that will re-direct the user to a form where he/she can create a new entry for that specific search criteria. Thank you for the help.
  5. 1 point
    Yes all these messages are in the localization you are using for this report page. Create a copy of the localization and under Results Pages >> Messages >> 351 No Records Found >> Add your custom text. You can also add HTML tags for instance <a href="UTL OF THE PAGE"> Add New </a> or you can also have JS.
  6. 1 point
    Hi @QueenB, Just to clarify your inquiry, you want your reports page to be updated automatically after submitting an entry in a pop-up window without reloading? As of now, it is not yet possible with the current platform. The Ajax functionality inside Caspio operates when submission form and reports are on the same page. You can check this forum thread and try this workaround instead. For your another question, you can change the location of your popup window by changing the values of the left and the top position. Provided below is a screenshot for your reference. I hope it helps.
  7. 1 point
    douvega

    Bulk Update Yes/No Field

    Hi, You can create a Report > Tabular datapage: https://howto.caspio.com/datapages/reports/creating-a-report-datapage/ Then enable the bulk edit option: https://howto.caspio.com/datapages/reports/data-editing-options-in-reports/ I hope it helps.
  8. 1 point
    Hi @edujobs2k18, You may try to use the following Javascript solution: <script type="text/javascript"> document.addEventListener('BeforeFormSubmit', function(event) { var entered_value = document.getElementById("InsertRecordDate0").value; var entered_date = new Date(entered_value); var permitted_date = new Date(); permitted_date.setDate(permitted_date.getDate()); if(entered_date < permitted_date) { alert("Cannot be a date in the past"); return false; } }); </script> This solution is designed for Submission form with AJAX enabled. Also, field name "Date0" used from your post. Hope this helps. Regards, vitalikssssss
  9. 1 point
    Scott17

    Search within range

    Hello, I have a search and report based on a table that has a column for "minimum" and a column for "maximum". I can put both of the fields on the "Configure Search Fields" with the Minimum having a comparison type of "Less Than or Equal" and the Maximum having a comparison of "Greater Than or Equal" so that the results are within the range. However, that requires the user to basically enter the amount in both fields. Is there a better way to do this so the user only has to enter the amount once? I'm hoping I can turn one of the fields into a hidden element that automatically has the value of the other field, but I have not been able to get that going. Thanks in advance! -Scott
  10. 1 point
    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 DataPage Data Source Section. (If you want otherwise, refer to my previous post instead. This is not cross-compatible as of the moment). 4.) In the Configure Fields section, Add a Header and Footer. 4.1) Select your header, disable the HTML Editor, paste the code block below, replace y0uR_4P1_k3y_H3r3 with your API Key. <script type="text/javascript" src="https://lib.caspio.com/pub/jquery/jquery.js"></script> <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=y0uR_4P1_k3y_H3r3"></script> <div id="cbwrapper"> 4.2) Select your footer, disable the HTML Editor, paste the code block below, edit the variables to correspond to your table fields. </div> <span id="error_message"> </span> <script type='text/javascript'> var lat_id = 'InsertRecordlat'; var lng_id = 'InsertRecordlng'; var address_id = 'InsertRecordAddress'; var city_id = 'InsertRecordCity'; var state_id = 'InsertRecordState'; var zip_id = 'InsertRecordZip'; var wrapper_id = 'cbwrapper'; var msg1 = 'Please input a valid address'; if(typeof jQuery != 'undefined'){ var cb_geocoder = cb_geocoder = new google.maps.Geocoder(); document.addEventListener('BeforeFormSubmit', function (event) { event.preventDefault(); var add = $('#'+address_id).val(); var city = $('#'+city_id).val(); var state = $('#'+state_id).val(); var zip = $('#'+zip_id).val(); if(!add || !city || !state || !zip){ alert(msg1); }else{ var full = add +','+city+','+state+' '+zip; cb_geocoder.geocode({address: full}, cbCallBack); } }); }else{ document.getElementById("error_message").innerHTML = "This Datapage require Standard Caspio Deployment for full functionality." ; } function cbCallBack(locResult){ if(locResult != "" && locResult.length>0){ var lat1 = locResult[0].geometry.location.lat(); var lng1 = locResult[0].geometry.location.lng(); lat1 = Number(lat1); lng1 = Number(lng1); $('#'+lat_id).val(lat1); $('#'+lng_id).val(lng1); $('#'+wrapper_id+' form').submit(); }else{ alert(msg1); } } </script> 5.) After saving this, you should be able to make this work. Basic Troubleshooting: > Check your Console by doing a Right-Click > Inspect in your browser. NoApiKeys: You forgot to add your key in the script tag. Google documentation here ReferrerNotAllowed: Check if the domain of your webpage is listed in your Maps API Console (Maps JavaScript API > Credentials > (Key) > Details) There's a bunch of other warnings/errors but I think the first two are the most common and critical. > Feel free to reply to this thread if you encounter problems. Note: This is not a full-fledged fix. I know I skipped adding the WebForm AppKey. Let's just wait for the official Caspio documentation updates. Regards, DN31337
  11. 1 point
    If you have ajax enabled the reset button would not work and as DevArora mentioned above you need to clear the values with JS
  12. 1 point
    The behaviour of type='reset' is not to clear the form elements, but to return them to the initial/default values when the page was loaded. After you submit your form, if you are then passing the submitted values back to the form to be pre-populated (set as the initial values) of the form, then your reset button will only reset the fields to those passed values, not to a "clean" state. To actually clear the form, you will need to use Javascript. Here is an example that would work for the HTML given in your question... <script> function customReset() { document.getElementById("name").value = ""; document.getElementById("country").value = ""; } </script> Just change your reset button to this... <input type="button" name="reset" value="Reset" id="reset123" onclick="customReset();"/>
  13. 1 point
    MayMusic

    Updating Data inside dropdown

    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. Select your lookup table as the data source. Click Next. You can select which fields to be used in your submission form. To select fields, move the fields from the Available Fields list to the Selected Fields list. Because you are submitting to a lookup table, it is likely that there will only be one (or very few) fields. Click Next. Format the Field as needed, Go to the Advanced Tab and check “on exit to pass field value as parameter”. Note the parameter name as you will use that name in your Javascript. Click Next again. Now on the last page, replace the success message with a JavaScript. This JavaScript will close the popup window and the new dropdown items will be visible. Go to the Source mode and insert the following JavaScript into the message panel: <script> window.close(); //Replace the FieldName with the Submission form FieldName(parameter name passed when you checked “on exit”. var element_value='[@InsertRecordFieldName]' var new_item = window.opener.document.createElement("option"); new_item.text=element_value; new_item.value=element_value; // Add new item to the dropdown try { //Replace the FieldName with the Original DataPage dropdown FieldName window.opener.document.getElementById("InsertRecordFieldName").options.add(new_item, null); } catch(ex) { //Replace the FieldName with the Original DataPage dropdown FieldName window.opener.document.getElementById("InsertRecordFieldName").options.add(new_item); } </script> Click Finish to Save Your DataPage. Deploy Submission Form 1. Select the Submission Form again and click the Deploy button. In order for the script to work, both DataPages must be embedded in webpages with the same domain name. You can make an empty webpage containing only the following HTML: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <body> CASPIO DEPLOY CODE </body> </html> 2. Replace "CASPIO DEPLOY CODE" with the deploy code of your submission form. If your original form is deployed using the URL deployment method you can deploy the submission form using the same method. 3. Copy the URL of the submission form and save it for use in the next step. Create a link in your original DataPage Now in your original form, you add a link that will display a popup window containing the Submission Form from the previous step. Select the DataPage where you would like to add the link and open the DataPage Wizard by clicking Edit. On the second screen be sure to enable advanced options. Proceed to the Configure Fields screen. Using the Insert button at the lower right of the DataPage Elements panel, add an HTML block. Go to the Source mode and insert the following link code into the HTML panel: <a onclick="window.open('DataPageURL','popup','width=307,height=341,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false">Add Option</a> Replace the DataPage URL portion with the URL of the first Submission Form. Update the other options in this hyperlink as needed. To move the link to the same line as the dropdown, select the dropdown DataPage element and go to the Advanced tab. Click the Checkbox for Continue next element on same line. Click Finish to save your DataPage
  14. 1 point
    MayMusic

    Simple View Setup Question

    Create a relationship and in your relation ship choose to see the name instead of ID, this will resolve the issue. Refer to http://howto.caspio.com/tables-and-views/relationships/relationship-settings/
  15. 1 point
    I have a simple HTML code to print the page. Below is the code: <!DOCTYPE html> <html> <head> <script> function printPage() { var w = window.open("http://www.sigmaaldrich.com/catalog/CofADocRequest.do?symbol=209104&LotNo=MKBP0842V&brandTest=SIGMA","_self"); window.focus(); window.print(); } </script> </head> <body > <input type="button" onclick="printPage()" value="print a div!" /> </body> </html> What the code does is, it displays a button, on clicking that button it calls a function. The function uses open() to open a new URL in the same page by using the “_self †parameter. As we can see in the code, the print() is being called after the call to open method. But in my browser IE11, the print pop is being shown befor loading the page. Due to this I am not printing the correct page. Can anybody help me on this.
×