Jump to content

wgalliance

Caspio Ninja
  • Content Count

    43
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by wgalliance

  1. In case anyone comes across this post, I did finally find an answer to my question. If I deploy the style to hide the column in the header of the WEBPAGE (vs header of the caspio page) then I can conditionally hide columns. Based on what page I am on, I hide different columns. Works perfect!
  2. Yes I have followed a previous post of yours to hide some columns that done need a condition. It's when I add the condition that I don't know how to make it work.
  3. I would like to hide a column in a tabular report IF it meets a specific criteria. I have looked at several forum posts including the following: http://howto.caspio.com/tech-tips-and-articles/advanced-customizations/how-to-dynamically-change-the-background-of-a-results-page/?_ga=1.209653078.530491687.1457713192 and Currently I have the following script added to the footer: <script> var isi = document.getElementById("visi[@field:CFC_zones_OPM_Name]"); if('[@authfield:User_Table_WGAusers_Access_Level]' == 'Finance'){ isi.style.display = 'none'; } </script> Help would be appreciated.
  4. The fields are number fields and users need to input those three figures, management + fundraising + total revenue. Sometimes they will enter the number with a dollar sign and I want to remove that if it happens. My script is then calculating a percentage based on the figures they are entering on the page and then displaying that percentage to them. So I need something that can remove any currency symbols or commas because it conflicts with my other script and the math doesn't calculate correctly.
  5. I have three fields in an Update Datapage (ManagementExpenses, FundraisingExpenses, and TotalRevenue) that I need to format as only numbers (no currency symbols), if someone enters $11,500.51 it would render 11500.51 or $1,500,000 would render as 1500000. I then use the numbers on a separate onchange function that calculates a % based on the three numbers in that same page. Could anyone help me with a script to remove any currency symbols if the user inputs them? I appreciate the help!
  6. I have a script that formats the phone number input to a particular mask, which works great. There are three fields in this Datapage that need the same masking script and currently I have copied the code three times and simply changed the field that it refers to (code below). I am wondering if there is a way to add an array to this so that if you update either the Finance_Phone, Primary_Phone or Additional_phone the script will run. That way the full script is on the page only once and not copied three times. function f_a(v_id) { return document.getElementById(v_id); } f_a('EditRecordFinance_Phone').maxLength = 14; f_a('EditRecordFinance_Phone').onkeyup = function(v_e) { v_e = v_e || window.event; if (v_e.keyCode >= 65 && v_e.keyCode <= 90){ this.value = this.value.substr(0, this.value.length - 1); return false; }else if (v_e.keyCode >= 37 && v_e.keyCode <= 40){ return true; } var v_value =(this.value.replace(/[^\d]/g, '')); if (v_value.length==7) { this.value = (v_value.substring(0,3) + "-" + v_value.substring(3,7));} else if(v_value.length==10){ this.value = ("(" + v_value.substring(0,3) + ")" + v_value.substring(3,6) + "-" + v_value.substring(6,10)); }; }
  7. I ended up fixing this with another method. I hid the button in the style and then created my own button that could be hidden with a rule.
  8. Hi MayMusic, I have had this script working on my pages for a while now. I recently changed some of my workflow so that the webpages now include a navigation menu that is a datapage in and of itself. This has made some of the script stop working. I've used this tutorial recommended by support to help me troubleshoot some issues. How can I rewrite this simple script which had been working prior to deploying a second datapage: <script> if (document.getElementById('EditRecordAppLocked').checked){ document.getElementById('Mod0EditRecord').style.display="none"; } </script> Any thoughts about how to use this with an .onload function that can then call the correct datapage by adding document.forms[1].onload to the script....
  9. Thanks! Outside of replacing the ID of my field what more would I do with this code? I am not a developer so I don't know how to change code. I copied the code and referred to the ID but don't know what more needs done to get it to work.
  10. How can I limit the number of words in a text area? I know I can limit the number of characters, but I need to limit the words to 25 or less and display an error message is the user tries to submit a statement that is more than 25.
  11. I have used the Caspio tutorial for adding a digital signature (http://forums.caspio.com/index.php?/topic/4693-js-adding-a-digital-signature-to-a-submission-form/). The signature is working great, but I want a way to disable it if the user has already "signed" their submission. I can use rules to hide the signature portion, but I cannot submit the page without the user submitting a new signature. This is the code for the signature capture: <canvas class="pad" width="218" height="55" style="margin: 0px 0px 0px 100px; border-style: solid; border-width: 1px; border-color: #bbbbbb #dbdfe6 #e3e9ef #e2e3ea; -webkit-border-radius: 1px; -moz-border-radius: 1px; -o-border-radius: 1px; border-radius: 1px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; background-color: #FFFFFF;"></canvas></br> <span style="margin: 0px 0px 0px 264px;"><input type="reset" class="clearButton" value="Clear"></span> <input type="hidden" name="output" class="output"> <script type="text/javascript"> $(document).ready(function () { $('#caspioform').signaturePad({drawOnly : true}); }); $("#cb_sign_wrapper form").submit(function(){ $("#InsertRecordSignature")[0].value = $("#cb_sign_wrapper .output")[0].value; }); </script> I want to disable the signature if the field has already been completed. Has anyone done this already and could provide the code?
  12. I have a single record update form deployed on my webpage which contains an iframe inside an html block on the parent page. This iframe collects a signature. I need help getting the signature to pass to the parent page once the iframe has been submitted. How can I pass a parameter from an iframe to the parent page it is deployed in?
  13. Yes! Thank you for catching such a silly error. I had to change a few other things but this was a simple oversight.
  14. In some cases this would work, but in many of my datapages I already have rules and conditions applied that do not allow me to to then disable fields. For the first time a user access the datapage, I have rules that set required fields, hide sections, etc. However, once they submit the page, a checkbox changes to "submitted" when that field is checked, if the user goes back to look at their information, I want to disable the ability for them to submit NEW changes to the datapage. I want to lock it from any further changes. Thus I do need JS because I cannot use the disable the fields in the rules section since they are already being used for other conditions.
  15. I have a checkbox field "AppLocked" that when checked I would like the submit/update button to be disabled (or hidden) and for their to be an alert that says "Your application is locked from edits. To submit any changes please contact your federation manager." Is there a simple code I can use for this purpose?
  16. Thanks! That worked beautifully! I used the code from the Caspio tutorial which is: <div class="sigPad signed"> <div class="sigWrapper"> <canvas height="55" width="198" class="pad"></canvas></div> </div> <script> var sig = eval("[@field:Signature]".replace(/"/g, '"')); $(document).ready(function () { $('.sigPad').signaturePad({displayOnly:true}).regenerate(sig); }); </script> for some reason this section of code (specifically for displaying) did not work on my details page. Thank you for sharing your solution!
  17. I have followed the Caspio instructions for setting up a digital signature pad (http://forums.caspio.com/index.php?/topic/4693-js-adding-a-digital-signature-to-a-submission-form/ I have used this code on two separate pages, one submission form, where the signature capture works. The second is on a details page where I both want to capture the signature (if previously not received) and I want to display the signature (if already signed). On this page, the capture portion works but I cannot get the display portion to work. So, if it was previously signed I am not able to see the signature. Here is the deployed page: http://www.wgaportal.org/reviewcertifications.html?ApplicationID=226 Help would be appreciated.
  18. I am having trouble with this simple if statement. I would like to update a checkbox field if a separate field is "Final Staff Review". The script I have is: <script> function = applocked(){ if (document.getElementById("EditRecordReviews_ReviewStage").value == "Final Staff Review") { document.getElementById('EditRecordApplication_Detail_AppLocked').checked = true;} else { document.getElementById('EditRecordApplication_Detail_AppLocked').checked= false; } } document.getElementById("caspioform").onload = applocked; </script> Am I missing something? The field is a Yes/No field and it is on the datapage as a checkbox field. I also have several formulas deployed on this page, could that be impacting this? This is currently not working.
  19. Thank you! I was able to add this and get the color to change dynamically for each instance.
  20. I would like to conditionally change the color of a display field on a detail page. I have a set of 9 fields that are all set as display fields. If the value is "Incomplete" I would like it to show up in RED text, otherwise nothing changes. I have read several of the forums but most of them refer to tabular reports or a field which the user updates. This is simply a details page with a display field. Thanks in advance,
  21. I need this function for one of my datapages but the difference is that I have an update form which needs to store the separate checkbox fields so I cannot use virtual fields. Can this script be used with actual checkbox fields rather than virtual fields?
  22. Thanks, that solved the error message. The second script f_change is still not working. I am able to create a new submission but still not able to change the Task_DescriptionofServices to either Incomplete or Not Required. the field that it is searching on is receiving data from an authentication field. Would this change the code?
×
×
  • Create New...