Jump to content

ezIQchad

Caspio Guru
  • Content Count

    238
  • Joined

  • Last visited

  • Days Won

    32

Everything posted by ezIQchad

  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>
  2. Trigger a javascript function to run with every keystroke object.onkeyup = function(){myScript}; Javascript function to measure String Length - http://www.w3schools.com/jsref/jsref_length_string.asp var str = "Hello World!"; var n = str.length; result of n would be 12
  3. What are you trying to accomplish? What have you tried? What happened? What did you expect to happen?
  4. Not exactly, but you can effectively do that. Use a view to join the tables and display all the records in one place
  5. Hello, This is not a question, but some may find this info useful. If you are using an external stylesheet, be sure to load your Caspio javascript prior to the linked CSS file. The script should come before <script type="text/javascript" src="https://**.caspio.com/scripts/e1.js"></script> the stylesheet <link href="style/sk.css" rel="stylesheet" type="text/css">
  6. Not if you want it to store as a currency value. You can format text fields with dollar signs, but currency must be a numeric value with two places after the decimal. If you don't want to do any sort of calculations or sorting try... var currEle = document.getElementById('InsertRecord_CurrElement'); currEle.onblur = function () { currEle.value = "$ " + currEle.value; }
  7. Vague question. Seems like a DataPage design problem. Make sure your DataPage goes to Detail by default if only one record present, and that the page on your site you want to load is where the Detail page you desire actually resides. Also, make sure data is filtered by the correct param. One thing to check is if you load a Caspio form from their servers a ?AppName=abc param is already loaded, so your URL param needs to be prefixed with a & rather than a ?. &YourUnamedVar=[@paramVal]
  8. I know answers that just say, 'I don't think you can do that' aren't very helpful, but I suppose it's better than leaving you hanging. I have also tried to figure out how to do this with no luck - so I just give the user a message / link in the HTML that this DataPage is embedded in
  9. Just a quick look brings a possible solution document.getElementById("SSN").onkeyup = function() should probably be document.getElementById("EditRecordSSN").onkeyup = function() { Then play around with the SSN format script to switch to taxID
  10. The size of the table doesn't directly affect data usage. Data usage is measured by data shown to the user. I can't decipher what you're trying to accomplish with your DataPage, so I can't provide any detailed advice, however, some conceptual advice... You can reduce data usage by filtering your data to only show relevant data to the users. Also AJAX is very heavy - I only use it on 1 of my ~125 DataPages.
  11. Caspio handles destination upon submit. Add the code for the desired redirect to a "Dispaly a Custom Message" option on the "Destination" page in the form editor. Then you should be able to simplify your code <script> var machtiging = "[@authfield:GEBRUIKERS_Machtiging]"; if(machtiging=="Yes") { window.location="[@app:logout]"; } else { window.location="[@app:horseplanner_home]"; } </script>
  12. I'm lost - please replace THAT, IT, THIS, etc. with descriptive terms Is value currency, quantity, or ID?
  13. I don't think this isn't directly possible with a Caspio Form. I think what you need here is two DataPages 1 - a report that lists the records you want to duplicate. Add an HTML Block that links to another page with a submission form. Pass the params you want in the link. <a href="someOtherPage.html?Param1=[@field:DataField1]&Param2=[@field:DataField2]&Param3=[@field:DataField3]&Param4=[@field:DataField4]"> 2 - a submission form that gets values from "External Data" Field1 = [@Param1]
  14. Deleting is possible, but not on a timeline like that. Filtering is not only possible, but paramount for a functional app. (I can't say deleting like that is NOT POSSIBLE, but I don't know how to do that without a lot of engineering, building, and rebuilding) It will launch your data usage through the roof, be hard to build, and adversely affect the user experience by slowing down login.
  15. That wouldn't be possible with Caspio alone, and wouldn't be great design regardless of platform. Filter records that are older than XXXX days old with a view or datapage
  16. Does what I say about using whatever you're changing as criteria to filter by make sense? i.e. Maybe what is happening to a Person when you talk about selecting them is that the record in the Persons table has Field6 updated to "GoSeahawks". So then create a VIEW that has Field6 is NOT EQUAL to GoSeahawks. So, once you select a person, and update their record, they won't show up in the list box
  17. Are you saying that you load the page, submit something, then the NEXT time you come to the page, you want the names to not show up? What are you changing about this person? Create a view, and use whatever you're changing as a criteria ----------- Double posts
  18. var someVal = '[@field:someField]' var someUser = '[authfield:someUserField]' var someElement = document.getElementById('elementID'); var someElement1 = document.getElementById('elementID1'); var someElement2 = document.getElementById('elementID2'); if(someVal > 100) { someElement.style.display = 'none'; } if(someUser == 'someParam'){ someElement1.style.display = 'none'; someElement2.style.display = 'none'; }
  19. Data type of Text(64000) is why that field isn't an option - those fields are way too large to compute in this scenario. This is expected behavior, and is not unique to Caspio.
  20. For most scenarios, I would consider a full result list in absence of search criteria desirable. What do you desire in the absence of search criteria? You might look at the Advanced tab and notice the "If left blank" options. Or if you have multiple search criteria, the Logic tab can affect how your results are produced.
  21. Cascading fields lose their static ID, so if it's a cascading text field the ID will change from "cbParamVirtual12" to something like "cbParamVirtual12_jhdas068fsda0t67f8" Try var AMF1 = document.getElementsByName('cbParamVirtual12')[0].value; rather than var AMF1 = document.getElementById('cbParamVirtual12')[0].value;
  22. Good idea May. That is definitely the easiest approach, however sometimes rules are limited. If the rules don't work try a CSS & JS solution. .UpdateRecordCanEMailBeUpdated {display: none;} var canUpdate = document.getElementById('UpdateRecordCanEMailBeUpdated').value; var emailEle = document.getElementById('UpdateRecordEMail'); if(canUpdate == 'Yes') { emailEle.style.display = "none"; } *NOTE* tableUser.CanEmailBeUpdated must be a text field to have an ID = UpdateRecordCanEMailBeUpdated. Set CanEmailBeUpdated with a dropdown with Yes and No as the only options.
  23. https://css-tricks.com/snippets/css/momentum-scrolling-on-ios-overflow-elements/
×
×
  • Create New...