Jump to content

Vitalikssssss

Caspio Evangelist
  • Content Count

    518
  • Joined

  • Last visited

  • Days Won

    51

Everything posted by Vitalikssssss

  1. Hi @Mik271828, It looks like the Datapage has been deployed within a container which has width <1024 px, hence responsive CSS has been applied on styling. You may disable a responsive option if you do not use Datapages on tablet/mobile devices or go into the Style section -->Source and change the HTML properties related to tablet/phone CSS. Hope this helps. Regards, vitalikssssss
  2. Hi @Elderberg, I would like to share a different approach, so instead of using a submit() function I have used the click() function on Submit button to mimic submit event. Also, it is possible to use AppKey of the Datapage in order to submit the particular Datapage if more than one is deployed. <script type="text/javascript"> document.addEventListener('BeforeFormSubmit', function (event) { if (event.detail.appKey == 'XXXXXXXXXXXX') { event.preventDefault(); //do smth before Submit document.querySelector(`#Submit${event.detail.uniqueSuffix}`).click(); } })
  3. Hi @asesores, That is very interesting question. I come up with a workaround which would allow to create a cross join between 2 tables in Caspio. Basically, you would need to add an additional field in both tables and specify the identical values for all records. Table #1 Table #2 Create a View with Full Outer Join by the Join Field: Here is a result which you shall have: Hope this helps. Regards, vitalikssssss
  4. Hi @Josh1425, Triggered Action settings looks inline with the desired output. Do you have a Triggered Action on table "Entity_Information"? Do you see data in table New_Intake_Information_Form within fields used in Triggered action? Regards, vitalikssssss
  5. Hi @jorgeorbit, Perhaps you did not follow the correct syntax while specifying the values of the fields. It would be easier to narrow down the issue if you send a Body of the request and specify datatypes of fields which you use to create a record. Regards, vitalikssssss
  6. Hi there, I have some check boxes, for example 5 and I want the form to not being submitted if at least one of them is checked. How can I do that? Thank you for looking into my question.
  7. Hi @Joanne, the way how you reference fields is incorrect for Inline Edit action of Tabular report and also you need to use a special event to capture the moment then user clicked on Edit/Update button/link. You may try to use the following snippet, however make sure that name of the fields are correct and have prefix "InlineEdit". <script> document.addEventListener('DOMSubtreeModified', function(){ let element = document.querySelector('[id*="InlineEdit"]'); if (element) { let regExp = /^[0-9]+$/; //Change the name of the fields let arr
  8. Hi @Shamir, It is possible to use External parameters within SQL query in Calculated field, so you would need to pass the parameter "on exit" from Virtual field and add it in WHERE clause of your SQL query. Hope this helps. Regards, vitaliksssss
  9. Hi @JMR21, You would need to add a line of code which would click on Search/Submit button after user clicks Clear Form, so it could pass empty string parameters to other Datapages. So, the JS snippet could look like this: <button type="button" onclick="resetForm()">Clear Form</button> <script> function resetForm() { var myForm = document.querySelector('form[action*="[@cbAppKey]"]').querySelectorAll('input:not([type=submit]):not([type=hidden]), textarea, select'); myForm.forEach(function(elem) { elem.value=""; }); var searchBtn = document.q
  10. Hi @Dallin, It looks like the issue is specific to your account and it is better to reach out to Support Team of Caspio. https://www.caspio.com/support They usually unavailable by phone on weekends, however LiveChat should be available. Regards, vitalikssssss
  11. Hi, I have recently tried to do something similar and came across the issue that custom button cannot serve delete event, so I have modified a script slightly. Here is my button in HTML block: <input class="cbDeleteButton" id="Mod0DeleteRecord1" name="Mod0DeleteRecord" type="submit" value="Delete" /> and here is my code from the DataPage Footer: <script> document.addEventListener('DataPageReady', assignEvent); function assignEvent(event){ //assign click event to custom button document.querySelector('#Mod0DeleteRecord1').addEventListener('click', ()=>{
  12. Hi @jrifkin, Glad that heard that solution has helped. Here is updated version which would also capture the file extension. Please note that you should use the following naming convention for your fields which would store extension: File_1_ext File_2_ext File_3_ext etc <script type="text/javascript"> document.addEventListener('DataPageReady', fileInputEvent) function fileInputEvent() { const fileFields = ['File_1', 'File_2']; fileFields.forEach(el=>{ document.querySelector(`#InsertRecord${el}`).addEventListener('change', fileInputHandler); }); doc
  13. Hi @JMR21, The above code needs to be updated since now all Caspio Datapages have AJAX and special event handler "DataPageReady". You may try the following updated JavaScript: <script> document.addEventListener('DataPageReady', assignEvent); 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 : ''; } function assignEvent(){ let fields = ["Field_1", "Field_2"]; //specify your fields here fields.forEach(element => {
  14. Hi @Bradl, Caspio Payment processor do not have an option for recurring charges. You may check with Professional Services Team of Caspio if they can built with custom programming. Regards, vitalikssssss
  15. Hi @jrifkin, It is possible but you need to follow certain naming convention: 1. Files fields you need to name them as: File_1, FIle_2, File_3 ... 2. File size fields should be named as: File_1_size, File_2_size, File_3_size ... Here is a slightly modified JavaScript provided by @Hastur: <script> document.addEventListener('DataPageReady', fileInputEvent) function fileInputEvent() { const fileFields = ['File_1', 'File_2']; //add more file fields if needed fileFields.forEach(el=>{ document.querySelector(`#InsertRecord${el}`).addEventListener('change
  16. Hi @randallsla, There is no feature in Caspio Authentication which could lock the account after certain number of unsuccessful attempts. You may truck number of login attempts with User Logs features. You can restrict the access to the Datapages for certain IP`s if you notice some unusual activity of under some IP address. Hope this helps. Regards, Vitalikssssss
  17. Hi @mhand, You may try to use the following JavaScript snippet: <script> document.addEventListener('DataPageReady', eventHandler); function eventHandler(){ document.querySelector('input[name="cbParamVirtual4"]').addEventListener('change', copyFields); document.querySelector('input[name="cbParamVirtual5"]').addEventListener('change', copyFields); } function copyFields(e){ const element = e.target.name; if(element === "cbParamVirtual4"){ document.querySelector('#cbDSField1').value = e.target.value; } else if (element === "cbParamVirtual5") { document.qu
  18. Hi @Elderberg, JS snippet looks correct. Perhaps you have some Triggered action which interfere with updated records. If not, you can share a whole snippet, so we could help you to narrow down the issue. Regards, vitalikssssss
  19. Hi @CraigSZ, Here is a page which has a Chart page dynamically rendered depending on which button was clicked. You would need to have some div element which would serve as a container for updated Datapage. <div id="datapage-container"></div> Here is a code which I have in Datapage. 1. HTML block with buttons: <div class="buttons"><input id="[@field:Name]" type="button" value="Sales in Eastern region"></div> <br> <div class="buttons"><input id="[@field:Name]" type="button" value="Sales in Central region"></div> 2
  20. Hi @Elderberg, I have recently found that you can get suffix from DataPage event. <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { let suffix = event.detail.uniqueSuffix; console.log(suffix); }); </script> Regards, vitalikssssss
  21. Hi @Chrille, The issue is caused by the following line of code. You can simple removed it in order to make it work. document.removeEventListener('DataPageReady', drawSignature); Regards, vitalikssssss
  22. Hi @Libby, Triggered Action have 10,000 records limit per run and same applies to Application Tasks. You will not be able to run a Task on table which has 61,000 records https://howto.caspio.com/tables-and-views/triggered-actions/
  23. Hi @aquintanilla, Here is possible way how you can achieve the desired functionality. 1. Add Virtual field to the form and set a default value URL to which user will be re-directed after submit. 2. Add the following snippet in Datapage Header. Make sure you make changes in lines with comment ***Change <script type="text/javascript"> document.addEventListener('DataPageReady', creatBtn); // function creatBtn () { // Hides the Virtual field const link = document.querySelector("#cbParamVirtual1"); //***Change Virtual1 if needed link.style.display = 'none'; //C
  24. Hi @ahmedramadan, Perhaps you may try the following code snippet: <script type="text/javascript"> document.addEventListener('DataPageReady', initGeolocation); function initGeolocation() { if(navigator.geolocation) { // Call getCurrentPosition with success navigator.geolocation.getCurrentPosition(success); } else { alert("Sorry, your browser does not support geolocation services."); } } function success(position) { /
  25. Hi @MrRee, I think it is better to raise a ticket for the support department: https://support.caspio.com/ Regards, vitalikssssss
×
×
  • Create New...