Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/25/2016 in all areas

  1. Check out this amazing trick I learned this morning. You can pass params into a datapage by adding the param right into the snippet from Caspio <script type="application/javascript"> var someVar = 'abc'; try{f_cbload("****************89c82&tf="+someVar,"https:");}catch(v_e){;} </script> My actual use case <script type="application/javascript"> var htmlFile = location.pathname.substring(location.pathname.lastIndexOf("/") + 1); try{f_cbload("****************89c82&tf="+htmlFile,"https:");}catch(v_e){;} </script>
    1 point
  2. Hi TexterVaid, It sounds like cascade update setting in relationship. You can read more here Hope that helps
    1 point
  3. Hi Mylene, As far as I know it is impossible to mass input data to the Table. But it is possible to submit record one by one. I have a Tabular report and every record has the "Add" button. On click, the New Form opens that receives parameters and auto-submit data to another table. Basically, this is invisible for my Users. To this, please do the following: 1) Create a Submission Form based on the second Table where all fields receive parameters on load. Click Finish->Deploy-> URL method->copy the URL 2) In the Tabular Report add a HTML block. 3) Create the "Add button" using Link Generator or simple code to create Pop-Up window: <a class='cbMenuItem' href='#' onclick='window.open("http://URL_OF_SUBMISSION_FORM.com&parameter=[@field:your_field]","mywindow", "menubar=1,resizable=1,width=500,height=500")'>ADD</a> | where URL_OF_SUBMISSION_FORM- is URL of the Submission form from step 2 and parameter- is a parameter that you want to pass on exit and receive on load in Submission Form. You should send parameters of all fields. 4) Go to Submission Form and in the Footer of it insert a auto-submit code from here: Every time User clicks Add, there will be invisible auto-submit Form, that will send information from selected fields to another Table. Hope this helps! Cheers Aurora
    1 point
  4. I address it this way: I have a few Caspio user classes, say user, superuser, admin. All datapages that use the "user" authentication, are embedded on wordpress "User" template-based Pages. The User template, in turn calls a specific WP "User" menu. So I have 3 authentications, 3 Page templates, and 3 menus. Finally, and I'm embarassed to say it: since these WP menus are NOT behind Caspio authentication, public users who guess a URL of one of your pages could see the menu, but obviously not the datapage embedded on the page. Still, I don't like that, so I have a script that looks for a DIV in my authentication form, and if present, hides the WP nav with CSS. Pretty nasty, and not really that effective, but it beats using 3 Caspio datapages for 3 menus.
    1 point
  5. LWSChad

    User Authentication Counter

    Yep, Set up an AutoSubmit [http://forums.caspio.com/index.php/topic/4314-js-auto-submit-a-datapage/] DataPage that fires after logging in... Then simply create a report DataPage to display the data however you want.
    1 point
  6. 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") The value in the field can be referenced using: - document.getElementById("id").value In the following sections, we will list the ID attributes for Caspio form elements in various DataPages. Submission Forms Text Field/Text Area/Dropdown/Checkbox/Listbox/Hidden: - InsertRecordFIELDNAME - FIELDNAME should be replaced with your field name. - For example: document.getElementById("InsertRecordFirst_Name") Radio Button: A radio button includes multiple options and each option has an associated ID. The ID is a name followed by a number: - InsertRecordFIELDNAMEX - X is the radio button option order, which starts at 0 and increments based on the order of each radio option. For example if your radio button has three options: Red, Blue, Green - Red is InsertRecordFIELDNAME0 - Blue is InsertRecordFIELDNAME1 - Green is InsertRecordFIELDNAME2 Virtual Field: cbParamVirtualX - X is the virtual field in the form, which starts at 1 and increments based on the number of the virtual fields in the form. - For example: document.getElementById("cbParamVirtual2") is referring to the second virtual field. Cascading Dropdown: Cascading dropdown and its parent dropdown are referenced by name since the ID changes on every page load. To reference cascading dropdown and its parent dropdown, use the following format: - document.getElementsByName("InsertRecordCompany_Name")[0] - Note that in the above format, the number 0 never changes. Display Only: These are not fields but span tags, therefore they don't have an ID. Details and Update Forms Details and Update Forms use the same rules and naming conventions as Submission Forms (in previous section), except that InsertRecord is changed to EditRecord. - EditRecordFIELDNAME - For example: document.getElementById("EditRecordFirst_Name") - Note that Virtual Fields and Display Only rules are the same as Submission Forms (in previous section). Search Forms Text Field/Text Area/Dropdown/Checkbox/Listbox/Hidden: - ValueX_Y - X is the form element order, which starts at 1 and increments based on the order of the element in the form. - Y is the criteria. It starts at 1 and increments based on the criteria order. It is always 1 if the field has no extra criteria. Radio Button: ValueX_Y[Z] - Z is the radio button option order, which starts at 0 and increments based on the order of the each radio option. Virtual Field: The rules are the same as Submission Forms (in previous section) Cascading Dropdown: This element should be referenced by name as explained in the previous section. The name of the element is ValueX_Y. Distance Search By ZIP/Postal Code: - Center of Search: cbDsField1 - Distance: cbDsField2 Distance Search By Coordinates: - Center Latitude: cbDsField1 - Center Longitude: cbDsField2 - Distance: cbDSField3 Authentication/Login Forms Text Field: xip_FIELDNAME - FIELDNAME should be replaced with your field name. Referencing Forms To access Caspio Forms/DataPages, you can reference the ID using: - document.getElementById("caspioform") Note that all Caspio DataPages share the same id as "caspioform". Therefore if there are multiple DataPages deployed on the same page, you need to reference them in a different way such as: - document.forms[X] X starts at 0 which refers to the first form on the page and increments based on the order. To access Caspio Authentication or Login Forms, use: - document.getElementById("xip_DataSourceName") - Replace "DataSourceName" with the name of data source used in your Authentication. Referencing Buttons Submit Button: Submit Update Button: Mod0EditRecord Delete Button: Mod0DeleteRecord Search Button: searchID Back Button: Mod0CancelRecord Login Button: xip_datasrc_DataSourceName - Replace "DataSourceName" with the name of data source used in your Authentication. Where to Place the JavaScripts In Forms, place your code in an HTML Block. The HTML Block should be the last element in the list. In Results, place the code in the Header or Footer unless you want the code to be executed for every record. Quick Tips If you need to reference an element that is not listed in the above document, try using F12/Developer Tools available from most browsers such as IE, Firefox, and Chrome. Developer Tools help web developers inspect the elements on the web page to find the related ID and also debug JavaScript code if necessary using the Console tab. For more information, check online for available tutorials using your browser's Developer Tools. In the meantime, you can see examples of JavaScript solutions in the community forum.
    1 point
  7. caspio

    Js: Auto-Submit A Datapage

    JavaScript Solution: Auto-Submit a DataPage Feature Description: This JavaScript solution shows how to auto-submit a DataPage. Caspio DataPage only submits to one table so if you need to perform submission to multiple tables you can use another DataPage and the following JavaScript to auto submit. Implementation: This solution can be used "as-is", without any changes if a. It is used in a Submission, Single Record Update, or Details DataPage and b. The DataPage is the only one Caspio DataPage deployed on your web page. c. The "progress_bar" image exists on your site: www.yoursite.com/images/progress_bar.gif. Or the URL should be adjusted to where your file is located. To use this solution, copy the code below and paste inside the HTML Header section of the DataPage using the Caspio Bridge DataPage Wizard. <div align="center" id="processing"> <p>Processing...</p> <img src="images/progress_bar.gif" alt="Progress Bar" width="200" height="15" /> </div> Then insert an HTML Block, copy the code below and paste inside the HTML Block section: <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { const error = document.querySelector('div[data-cb-name="HeaderErrorMsg"]'); if(!error){ if(document.getElementById("caspioform")) { document.getElementById("caspioform").style.display = 'none'; setTimeout('document.forms["caspioform"].submit()',1000); } } }); </script> In submission successful message area, click on Source button and paste the code below. <style type="text/css"> #processing{ display:none; } </style> Tested Browsers This JavaScript solution was tested on the following platforms and Internet Browsers only. # MS Windows - IE 10, Firefox 25.0.1, Chrome 31.0.1650.57, Safari 5.1.7 Disclaimer: Use these JavaScript solutions at your own risk! They are provided to assist you in the customization of your programs and while we believe they work properly, by using them you accept all responsibility about them and confirm that they are not a feature of Caspio's platforms and as such are provided "as is" without any warranties, support or guarantees.
    1 point
  8. If you want them to feed the table without having access to Caspio you can request for datahub which is a scheduled import/export task. User can put the file somewhere like a FTP site and Caspio can be programed to run for instance every hour to import the data. Using this feature you can either replace the table or append the data to the table If you want to let them update certain records then you can try web services http://www.caspio.com/extend/platform-extensions/web-services.aspx if you know programming.
    1 point
×
×
  • Create New...