Jump to content

wgalliance

Caspio Ninja
  • Posts

    43
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by wgalliance

  1. Thanks, I tried that one as well, its still returning an error message on the CampaignName_EIN field which is the result of the concatenate function.
  2. Hmmm, I tested it and it wouldn't work. If I remove the f_change function then it will create a new submission, otherwise I get the message "Values in one or more field are invalid". The field ApplicationType I have it receiving an authentication field on load. Could it be that I need to write the code in a different way? if ([@authfield:CharityDetail_FullApp].value == "Partial Application"){ document.getElementById("InsertRecordTask_DescriptionofServices").value = "Not Required"; } else { document.getElementById("InsertRecordTask_DescriptionofServices").value = "Incomplete"; } I tried the above and it still would not work. I will message you the login credentials to look at the page.
  3. I have two scripts I'd like to run on the same Submission form. The first one (Concatenate) combines several fields. This script has worked fine up until I added the second script. The second script needs to look for a value in the Application Type field and if the value is "Partial Application" then it changes a field to "not required" if the value is "full application" then it changes the field "Incomplete". Once I added the second script, neither of them work. Could someone help me out with how this should work? <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var position1 = document.getElementById("InsertRecordCampaignYear").value = "2017 CFC"; var position2 = document.getElementById("InsertRecordFedAcronym").value = "[@authfield:CharityDetail_Fed_Acronym]"; var position3 = document.getElementById("InsertRecordEIN").value = "[@authfield:CharityDetail_EIN]"; var allpositions = position1 + " " + position2 + " " + "-" + " " + position3; document.getElementById("InsertRecordCampaignName_EIN").value = allpositions; { {document.getElementById("caspioform").onsubmit=concatenate; } document.getElementById("caspioform").onsubmit = function(){ if (document.getElementById("InsertRecordApplicationType]").value == "Partial Application"){ document.getElementById("InsertRecordTask_DescriptionofServices").value = "Not Required"; } else { document.getElementById("InsertRecordTask_DescriptionofServices").value = "Incomplete"; } } </SCRIPT>
  4. Correct, because the logo was offsetting the placement of some of the fields, I placed all fields within html blocks so that the spacing would not be offset.
  5. I found this old thread which helped me solve the spacing and row issue. I knew it had something to do with creating tables in my datapage, I just didn't know how to structure it.
  6. Here is a second attempt. The file has been moved to the top but as you can see it is creating space between the legal name and the EIN. Ideally there would be no space there, and the left hand column would be moved up where maybe the Legal name, EIN and Federation take up the place to the left of the logo.
  7. I have an issue where displaying the logo is limiting the design of a particular page. In the image below, I would like to have the logo displayed just under the second column "Public Profile" but at the top. If i move it there, the fields "legal name" "EIN" and "federation" are shifted to align with the next row below the logo field, so the extra space you currently at the bottom appears at the top. I believe this is due to the cell spacing and the fact that the logo is in one row, thus I cannot have multiple fields in that same row on the left column. Is there a way to have the logo at the top but not shift the left side column at all? I hope this made sense.
  8. Thanks this code worked perfectly. I would like the Drop Down field to be a cascading dropdown, when this is done, the script no longer checks the box. I assume this is due to the cascading drop down. How would I edit the code in this scenario?
  9. I have a submission form with a drop down menu listing National or Local. I would like a way that if the user selects "National" in the dropdown menu, upon submission of the form the StateCampaign checkbox field is set to "yes". Thanks.
  10. I have a submission form with a drop down menu listing National or Local. I would like a way that if the user selects "National" in the dropdown menu, upon submission of the form the StateCampaign checkbox field is set to "yes". Thanks.
  11. I have my login page deployed which is working fine. the User ID is a text field that is a 9 digit number, often seen by the user as XX-XXXXXXX. In the input for the login screen, if someone enters the hyphen, I'd like to add script to remove it so it happens in the background. This is what I added so far that is not working: <SCRIPT LANGUAGE="JavaScript"> function nophyphen() { var a = document.getElementById("xip_EIN").value; a = a.replace(/-/g, ""); } document.getElementById("caspioform").onchange=nohyphen; </script>
  12. I tried again and it is still not working. Here is my final code with your edit: <script> var o_els = new Array("EditRecordPublicPhone","EditRecordFaxNumber") ; function tel() { // Read the content of the textbox // var message = document.getElementById("o_els").value; //Skip function if textbox is empty, else you will see () - for (var i = 0; i < o_els.length; i++) { if (o_els != "") { var message=document.getElementById(o_els).value; // Strip off all the spaces document.getElementById(o_els).value = (message.replace(/[^\d]/g, '')); var message1 = document.getElementById(o_els).value; document.getElementById(o_els).value = ("(" + message1.substring(0,3) + ") " + message1.substring(3,6) + "-" + message1.substring(6,10)); } } } // Call function when value in the textbox changes for (var i = 0; i < o_els.length; i++) { if (o_els){ document.getElementById(o_els).onchange=tel; } } </SCRIPT> Am I missing something?
  13. I need help with a calculation that needs to round to the tenth of a percent. I have an update form with four fields. The fourth field is a calculation based on the numbers entered into 1, 2, and 3. Management Expenses Fundraising Expenses Total Revenue AFR My calculation must add management + fundraising and divide that sum by Total Revenue. The result should be input into the AFR field and rounded to the tenth of a percent. A few examples of what I need to accomplish: 500 + 500 / 12,000 = 0.0833333 this should be rounded to 8.3% 600 + 500 / 12,500 = 0.088 this should be rounded to 9.0% The current code that I have used based on the first calculation above only shows 8.0%. I'm new to java so I don't know all the coding that I could be missing here. One other wrinkle is that I would like the calculation to strip any symbols. For example if someone enters $1,200 or $1,200.01 I would like to show only 1200 or 1200.01 in the field. I need a way to ensure no symbols are entered into those fields that may render a calculation error. <SCRIPT LANGUAGE="JavaScript"> function calculate() { var v_management = parseFloat(document.getElementById("EditRecordManagemenExpenses").value); var v_fundraising = parseFloat(document.getElementById("EditRecordFundraisingExpenses").value); var v_totalrevenue = parseFloat(document.getElementById("EditRecordTotalRevenue").value); var v_afr = (([v_management + v_fundraising] / v_totalrevenue)*100); document.getElementById("EditRecordAFR").value = Math.round(v_afr).toFixed(1) + "%"; } /* On submitting the webform, the function calculate is executed */ document.getElementById("caspioform").onchange=calculate; </SCRIPT> Any help would be appreciated! One other wrinkle is that I would like the calculation to strip any symbols. For example
  14. I am currently using the above code on an update form to edit three phone fields and it is working well with one exception: I occasionally will have a customer that will remove a phone number and want to leave that field blank. Currently if this is done the field reverts to showing "( ) -". Is there code that I can add to make this field completely blank if the user decides to delete a phone number previously stored? Thank you.
  15. I would like to include javascript on several datapages where upon submission or update of that particular page it will change a form field value from No to Yes. I have a multi-step process with 8 different datapages. I want to be able to see which portions have been "completed." Thus requiring me to have a yes/no checkbox for each section (i.e. datapage). After page 1 is submitted, I want that yes/no checkbox to be checked to "Yes", the field is hidden in the datapage. Thanks in advance for any input!
×
×
  • Create New...