All Activity

This stream auto-updates   

  1. Today
  2. Hello, I now understand how the syntax works. Thanks for your help, Julien
  3. Hi Mathilda, I have managed to sort my issue out! I was using a radio choice field, hence why it wasn't working as my reference was not correct. It's now fully working. Thanks for your help with this! Julien
  4. Yesterday
  5. Hi Mathilda, That works fantastic- many thanks for the simple, elegant solution. I just had to change go(-1) to go(-2) because the submit page refreshes upon submission so to get back to the page before it originally loaded requires a -2. But that's excellent-thanks again!
  6. Hi Mathilda, I followed your instructions, but sadly I cannot get it to work. I can get this error message in the debugger: Unable to set property 'onchange' of undefined or null reference My virtual field is called Virtual1, my email field is called Email_address and the trigger field is called Approved_by_CFA. I inserted this scrip in the footer of the details page, but nothing happens if I update the 'Approved_by_CFA' field: <SCRIPT LANGUAGE="JavaScript"> function insert() { var x= document.getElementById("EditRecordEmail_address").value; document.getElementById("cbParamVirtual1").value = x; } document.getElementById("EditRecordApproved_by_CFA").onchange=insert; </SCRIPT> Thanks again for your help. Julien
  7. Hi there, I have 2 tables that I'm passing parameters between using a redirect and auto-submit. In the datapage, the user can assign a star rating which is updated in the main table. I wish to pass that parameter to my second table (via the redirect / auto-submit) ONLY if it has changed ... At the moment, the field is called "QA_Tester_Rating" in both tables and it is passing fine from the redirect etc to the 2nd table. Do I want to set up a script in my first datapage or second, to look for changes in the field and only pass the figure if it has changed? I want the field to be blank in my table if there are no changes. Any help much appreciated! Nikki
  8. @Mathilda can I be super cheeky and ask if you'd mind looking at my other post here? You really are a Rockstar and your input would be most appreciated
  9. Try calling a function onload: <SCRIPT LANGUAGE="JavaScript"> window.onload=function goBack() { window.history.go(-1); } </script> Hope that helps
  10. Hi there, I'm trying to add a graphic star rating system to my site. I've found the following: http://callmenick.com/post/five-star-rating-component-with-javascript-css which gets me about halfway there, but I just need some slight modifications! This is what I have in my datapage so far: <div id="el" class="c-rating"></div> <script src="http://www.cambridgedata.org/Testboard/manager/five-star-rating-master/js/dist/rating.min.js"></script> <script> // target element var el = document.querySelector('#el'); // current rating, or initial rating var currentRating = [@field:QA_Tester_Rating#]; // max rating, i.e. number of stars you want var maxRating= 5; // callback to run after setting the rating var callback = function(rating) { alert(rating); }; // rating instance var myRating = rating(el, currentRating, maxRating, callback); </script> Where the field QA_Tester_Rating is the field in my table I want to read from and update using this system. At present, it reads from the field fine when there is something already in there, but if the field is blank, the stars don't show at all, so this is my first problem - I'd like the 5 stars to appear, empty, on the page when there is no rating yet. The second issue is that it's not updating my table. I tried adding something along these lines: document.getElementById("EditRecordQA_Tester_Rating").value=myRating; But my javascript is terrible and it obviously didn't work. Last issue, I would like to remove the popup alert when you change the rating. I thought it would be as simple as removing the bit that says: { alert(rating); } But that didn't work either! Any help you can give would be much appreciated! Nikki
  11. parameters

    Hi Vitalikssssss: This news sounds promising. However I'm not seeing where or how to choose whether the hidden or display value will appear in the mail. Here is what I see on the Advanced panel for this Multi-Select Listbox field. No mention of parameters. I tested survey submission again and I am still getting the number values instead of the display values.
  12. Last week
  13. I'm have a submission form that uses custom buttons (because of the need to show/hide Submit due to Rules) to do the Submit. I need, after submitting the new record, for the destination to go back in History a page (or two if the submit refresh logs the form as a page in History). I can't get the code to run in the Destinations wizard, using Message and html editor disabled. Here's what I have so far: basically the data submits correctly and a new record is created but I get no redirection to previous url. <SCRIPT LANGUAGE="JavaScript"> function goBack() { window.history.go(-1); } document.getElementById("caspioform").onsubmit = goBack; </script> The other option I tried was to put the js in the html block with the custom button for Submit. It does run the 'go back' code but the new record doesn't actually get submitted. So it's either the 1st choice with record submitted and no back-redirect or the 2nd choice with no record submitted and back-redirect working. If someone could clarify how to get the actual 'submit' AND the 'back-redirect' to work that'd be really great. Here's the custom button code in the html block, if that helps: <div style="text-align: center;"><input class="cb_custom_btn" type="submit" onclick="goBack()" value="SUBMIT" /> <SCRIPT LANGUAGE="JavaScript"> function goBack() { window.history.go(); } document.getElementById("caspioform").onsubmit = goBack; </script> </div>
  14. Hi Mark, I believe that it is possbile. You may customize JS solution from this post: https://forums.caspio.com/index.php?/topic/3200-js-concatenatecombine-two-fields-into-one-field/ You need to change element_id to reference Virtual field(correct syntax: cbParamVirtualX ). You may also need to change an event trigger i.o. onsubmit. Hope this helps.
  15. Hi nuimage, I see that you have missed an assignment operator '=' in your code after "document.getElementById('EditRecordAttendees').value": So code in Footer should look like this: </div> <script> document.getElementById('EditRecordAttendees').value = parseInt(document.getElementById('EditRecordAttendees').value) + 1; document.getElementById('caspioform').submit(); </script>
  16. Hi Nikki, I edited your script a little bit, try inserting script in the footer: <SCRIPT LANGUAGE="JavaScript"> window.onload=function myfunc(){ Stamp = new Date(); var v_TimeStamp; Hours = Stamp.getHours() Mins = Stamp.getMinutes(); /* Construct the value of the v_TimeStamp variable in the format m/d/yyyy hh:mm */ v_TimeStamp=('' + (Stamp.getMonth() + 1) +"/"+Stamp.getDate()+ "/"+Stamp.getFullYear() + ' ' + Hours + ":" + Mins); if ('[@field:Actual_result]'.length>1 && '[@field:Test_Completed]' === "") { document.getElementById("EditRecordTest_Completed").value=v_TimeStamp; } } </SCRIPT> Both fields should be editable text fields on a datapage, if you need to hide a field, you may use display:none attribute, like explained here
  17. Google viewer frame will display embed document from Caspio if you encode the URL link of file stored inside Caspio account: So, URL link will look like this: https%3A%2F%2Fe1.caspio.com%2FdpImages.aspx%3Fappkey%3D____%26fileID%3D_____ I have used following link to generate the encoded URL. Hope this helps
  18. Hi there, I would like to timestamp a field (Test_Completed), but only if it hasn't already been timestamped and only if a different field (Actual_result) has content. I found a forum answer about timestamping a field, and have tried to modify it to include my conditions, but I am not too good with JavaScript! This is what I've done, can anyone help?? <SCRIPT LANGUAGE="JavaScript"> /* Declaration and initialization */ Stamp = new Date(); var v_TimeStamp; Hours = Stamp.getHours() Mins = Stamp.getMinutes(); /* Construct the value of the v_TimeStamp variable in the format m/d/yyyy hh:mm */ v_TimeStamp=('' + (Stamp.getMonth() + 1) +"/"+Stamp.getDate()+ "/"+Stamp.getFullYear() + ' ' + Hours + ":" + Mins); if ('[@field:Actual_result]' === 'input.length >1' && '[@field:Test_Completed]' === "") { document.getElementById("EditRecordTest_Completed").value=v_TimeStamp; } </SCRIPT> Many thanks Nikki
  19. We found a solution of sorts for this so just adding by way of update in case anyone else looks at this. The Calculated field did not work for us we ended up finding that its is not easy concatenating a text area field and w test field. Capsio Support did have some work around but it did feel like we were likely to end up with issues with this method further down the track. What we did do though is look at bulding our Notes on trhe fly and using Bulk edit to provide field values with which we could concatenate on the users screen. In this way what we have been thinking of as 1 large Notes Text Area field became 3 smaller fields appended at the beginning of the main Notes Text area field. Using html we displayed this within a sin gle panel to give the effect one single field re contents though it was actually 4 fields in one. When looked at in a details screen on update we justed some JS to take the 3 smaller field values and then add then to the bigger Text Area field and then black them out. The next effect was that we could provide a Bulk Update that looked as if it could insert text values into another field (the Text Area one) across multiple records when can then be updated with further individual items at a later date. Morale by looking at issue the other way round we were able to come up with a solution. Its not tidy but it does work.
  20. Hello All, Is it possible to concatenate two virtual fields into a third virtual field on a submission page? It doesn't seem to be working for me. Thanks Mark
  21. Hello Vitalikssssss, I've reviewed the article countless times on "how to limit the number of submissions" but still cannot get the form to update the courses table. I did correct a small typographical error in the javascript (semicolon missing from first edit record statement) that updates the page but still without success. What am i missing? Below is the the javascript from my single record update page. Unique ID field - Course_ID Parameter name - [@cid] Attendees - field to update Header code - <div style="display:none"> Footer code - </div> <script> document.getElementById('EditRecordAttendees').value; parseInt(document.getElementById('EditRecordAttendees').value) + 1; document.getElementById('caspioform').submit(); </script> Destination after record update goes to a new data page. I'm forwarded to the new page as expected and do receive the confirmation message that i crafted, but the Attendees field in the Courses table is never updated. Thanks for your input!
  22. Does anyone know if its possible in JS to dynamically change the filters applying to a Table or View that's linked to a datapage? I have several checkboxes for Users to select from, and the selections can drastically alter the types of filters I want to apply. Essentially I'm looking for much greater control over the results table than the Caspio wizard screen filters can allow. Thanks
  23. Actually, all I really need to do is prevent the change function from running onload. That would solve the whole problem. Is there any way to prevent a function from running onload?
  24. Hi there, Yes, I put the script in the footer of the details page. I'm sorry to be a pain, but could you tell me what is wrong with the syntax? I had read the post you mentioned, and that formed the basis of the scrip I wrote, in conjunction with this post. I have very little knowledge of Javascript, so I'm not sure where I went wrong... Many thanks, Julien
  25. Hi, I'm trying to run a 'change' function on a virtual field ONLY when a regular field is Null. This is in a submission form. The code I have below seems to run automatically when the form is opened, I guess because the virtual field is a cascading dropdown so it's 'changing' when the form is loaded, based on the parent field. I only want this code to run if the 'ItemID' field (ItemID is not the parent of the cascading Virtual9) is null. If it is not null then I need this code to not run at all, even onload. I've tried a bunch of different 'if' scenarios but can't get it to work. Hopefully someone can help.. <script> $("[name='cbParamVirtual9']").change(function(){ var itid = document.getElementsByName("cbParamVirtual9")[0].value; var item = document.getElementsByName("InsertRecordItemID")[0].value if (item !== null) { document.getElementsByName("InsertRecordItemID")[0].value = itid; } } ); </script> NOTE: I ran an alert window to make sure the values in Virtual 9 are being gotten and used- they are and they are put in the ItemID field as needed on the Virtual 9 change. The problem is that when ItemID is not null on the form's load (it receives and external parameter, if there is one) the code still runs. This will overwrite the ItemID's external parameter received. Also, I'm not sure why ItemID works with getElementsbyName instead of getElementbyID because it's just a text field and not dropdown,list,cascading, etc. But the code didn't work unless I used getElementsbyName.. I think I just need to add the correct 'if' expression that runs or doesn't run the 'Change' function next. <script> var item = document.getElementsByName("InsertRecordItemID")[0].value; <!-- right here I need an if (item !== null) to then run the change(function(){ but that if it's not null to not run the change(function(){ --> $("[name='cbParamVirtual9']").change(function(){ var itid = document.getElementsByName("cbParamVirtual9")[0].value; document.getElementsByName("InsertRecordItemID")[0].value = itid; } ); </script>
  26. parameters

    Hi RkaydianFlower I believe that it should be possible after 9.7 Caspio Bridge platform release. http://howto.caspio.com/release-notes/caspio-bridge-9-7/ Hope this helps.
  1. Load more activity