Jump to content

wimtracking2

Members
  • Content Count

    13
  • Joined

  • Last visited

About wimtracking2

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I was able to get this figured out. I needed to move my code to my footer. I have deployed an update datapage on Wordpress and the javascript below works fine. However, I deployed it on a Weebly website and it is not working. I have pasted the javascript below and then also the deployment code I put on Weebly. I have other custom javascript that is working on the same datapage, so wondering if the iMask might be the problem? Javascript in the Datapage: <script src="[@app:iMask/]"></script> <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { var phoneMask = IMask( document.getElementById('EditRecordFax'), {mask: '(000) 000-0000'}); var phoneMask = IMask( document.getElementById('EditRecordOffice_Phone'), {mask: '(000) 000-0000'}); var phoneMask = IMask( document.getElementById('EditRecordOther_Phones'), {mask: '(000) 000-0000'}); var phoneMask = IMask( document.getElementById('EditRecordPrimary_Phone_Number'), {mask: '(000) 000-0000'}); var phoneMask = IMask( document.getElementById('EditRecordCell_Phone'), {mask: '(000) 000-0000'}); var phoneMask = IMask( document.getElementById('EditRecordHome_Phone'), {mask: '(000) 000-0000'}); var phoneMask = IMask( document.getElementById('EditRecordBeeper'), {mask: '(000) 000-0000'}); var phoneMask = IMask( document.getElementById('EditRecordOther_Phone'), {mask: '(000) 000-0000'}); }); </script> Datapage embed deployment code: <script type="text/javascript" src="https://c2axa376.caspio.com/dp/3c194000bfe6c015b6ac4d52b0e2/emb"></script> <div class="cxkg"><a href="https://c2axa376.caspio.com/dp/3c194000bfe6c015b6ac4d52b0e2">Click here</a> to load this Caspio <a href="http://www.caspio.com" target="_blank" title="Cloud Database">Cloud Database</a></div> <div id="cb3c194000bfe6c015b6ac4d52b0e2"></div>
  2. Hi @DesiLogi Is there anyway to use this same solution, but for the user to multi-select from checkboxes rather than the listbox?
  3. Hi @Andrew I implemented your iMask framework to format my phone number fields and it worked great. I deployed my datapage into a wordpress site without a hitch. However, when deployed into a Weebly website, it did not work. Other custom javascript is working in the same datapage on the Weebly site. Curious if you have run into this before, know what would cause the issue and if you have suggestions on what I might try to get it to work? Below is the code I implemented and it works when deployed on a wordpress site. <script src="[@app:iMask/]"></script> <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { var phoneMask = IMask( document.getElementById('EditRecordFax'), {mask: '(000) 000-0000'}); var phoneMask = IMask( document.getElementById('EditRecordOffice_Phone'), {mask: '(000) 000-0000'}); var phoneMask = IMask( document.getElementById('EditRecordOther_Phones'), {mask: '(000) 000-0000'}); var phoneMask = IMask( document.getElementById('EditRecordPrimary_Phone_Number'), {mask: '(000) 000-0000'}); var phoneMask = IMask( document.getElementById('EditRecordCell_Phone'), {mask: '(000) 000-0000'}); var phoneMask = IMask( document.getElementById('EditRecordHome_Phone'), {mask: '(000) 000-0000'}); var phoneMask = IMask( document.getElementById('EditRecordBeeper'), {mask: '(000) 000-0000'}); var phoneMask = IMask( document.getElementById('EditRecordOther_Phone'), {mask: '(000) 000-0000'}); }); </script> I answered my problem - it was a browser update issue. Oi
  4. I did get this answered through another post: https://forums.caspio.com/messenger/465/?tab=comments#comment-831
  5. Thank you @douvega, your code worked perfectly. I was able to implement it for 8 fields needing to function the same way. <script type="text/javascript"> //JS code created by douglas.vega1989@gmail.com function f_listbox(fieldObj) { //Set field to multi-select fieldObj.multiple = true; //Get field values var values = fieldObj.value; if (values.indexOf(",") > 0) { for (var i=0 ; i < fieldObj.options.length; i++) { if(fieldObj.value == values) { fieldObj.remove(i); break ; } } var arr = values.split(", "); for (var j=0 ; j < arr.length; j++) { for (var i=0 ; i < fieldObj.options.length; i++ ) { if(arr[j]== fieldObj.options.value){ fieldObj.options.selected = true; break ; } } } } } setTimeout(f_listbox(document.getElementById("EditRecordCertifications")), 20); setTimeout(f_listbox(document.getElementById("EditRecordTreatment")), 20); setTimeout(f_listbox(document.getElementById("EditRecordAges")), 20); setTimeout(f_listbox(document.getElementById("EditRecordTherapy")), 20); setTimeout(f_listbox(document.getElementById("EditRecordAgency_Services")), 20); setTimeout(f_listbox(document.getElementById("EditRecordInsurance")), 20); setTimeout(f_listbox(document.getElementById("EditRecordAccept")), 20); setTimeout(f_listbox(document.getElementById("EditRecordAreas")), 20); </script>
  6. @douvega I modified the code per this post This is what I have: <script type="text/javascript"> function f_listbox(v_state) { if ( v_state.indexOf(",") > 0 ) { for (let i=0 ; i < o_state.options.length; i++ ) { if(o_state.value == v_state) { o_state.remove(i); break ; } } let o_st = v_state.split(", ") ; for (let j=0 ; j < o_st.length; j++) { for (let i=0 ; i < o_state.options.length; i++ ) { if(o_st[j]== o_state.options.value){ o_state.options.selected = true ; break ; } } } } } document.addEventListener('DataPageReady', function (event) { let v_state = ["Certifications", "Therapy", "Ages", "Agency_Services", "Insurance", "Accept", "Areas", "Treatment"]; //Field names goes here let o_state = []; v_state.forEach(function(el) { if (el !== null) { o_state.push(document.getElementById("EditRecord"+el)); } }); o_state.forEach(function(el){ if (el !== null) { el.multiple = true; } }); f_listbox(v_state); }); </script>
  7. Thanks @douvega I followed your suggestion and set up a multiselect listbox as you listed in your option 2. (Follow this Caspio solution for a Multiselect Listbox option: https://forums.caspio.com/topic/4315-js-multiselect-listbox-in-update-datapage/) This is working, however, I am using an update form. I would like the current options to be individually pre-selected, rather than a list pre-selected. See attachments, Capsio1.png is what is currently displayed. I would like it to show up as it does in Caspio2.png. Do you know how to accomplish this? Thanks again,
  8. Hi @Vitalikssssss This solution is working for me on an update submission form. Thank you. Is there a way that it can be altered to pre-select the listbox options individually as stored in the database rather than selecting one option summarizing the data in the table. See attached images. Caspio1.png shows how the field currently shows up in the update form based on the current data in the table. I would like it to display as shown in caspio2.png. Can this be done? Thank you
  9. I have built a Caspio submission form that contains 8 fields that collect data using a multi-select string field. Upon submission of the data, I need to send the data to FormStack. I am using Zapier to do so. The problem I am running into is that Zapier does not read the multi-select data field. Does anyone know of a work around of how I can collect the data via a multi-select field in a submission form and send the data to another database?
  10. I needed a similar way for users to search for duplicate accounts and merge through a datapage. I just added an HTML field on an account datapage and sent parameters to a new datapage that was pre-filtered using the parameters from the account they were on.
  11. This worked: window.onload = function () { var table = document.getElementById("caspioform").getElementsByTagName("table")[0]; table.style.pageBreakInside = "auto"; for (var row of table.rows) { row.style.pageBreakAfter = "auto"; row.style.pageBreakInside = "avoid"; } }
  12. Any ideas on how to insert a custom link next to the standard link that you can choose to allow users to download records into Excel/csv in a gallery report. See attached image.
  13. I have created a gallery report and I need to allow for only 30 results to print per page using browser print. I want the user to be able to print all of the query results at once so I don't want to set it up to show 30 records per page and then make the user scroll to the next page and hit print again. I believe the best way to achieve this I need to insert a page break after every 30 records. Is this achievable? If so, how? Thank you.
×
×
  • Create New...