Jump to content


Caspio Ninja
  • Posts

  • Joined

  • Last visited

  • Days Won


lmooring last won the day on September 27 2014

lmooring had the most liked content!

About lmooring

  • Birthday February 22

Recent Profile Visitors

695 profile views

lmooring's Achievements


Newbie (1/14)



  1. Hi thank you for the response. Unfortunately formula fields are not visible on the submission form (to my knowledge). I need the date+1 to appear on the submission form prior to submission. If the date needs to be changed due to the result of the +1 date calculation, the user can do so prior to submitting the form.
  2. Hi, I have a simply one that I just can not figure out. I know it's easy but I haven't been able to get this to work. I have a field where the user will enter a date. I want to take that date and add one, then insert into another field on a submission form. Field Name: End Date (user entered) = 10/23/2017 Field Name: Expire Date (calculated) = 10/24/2017 Any help would be appreciated.
  3. Quick question because I have similar issue. What if you wanted the date to appear on the submission prior to the form being submitted? So if the user needed to change the date based on the calculation result they could? A formula field would give you the correct result but is not able to be displayed on the submission form.
  4. I am attempting to use a simply JavaScript to create an extended cost on a submission form. I have a few lines of this. When I add the JavaScript, only the last script works. Almost like it is canceling out the prior. I do not know how to make them both work or how to combine them into one larger script. Any assistance would be greatly appreciated. My lines of code are inserted below. They work individually but not both at once on the same submission form. <SCRIPT LANGUAGE="JavaScript"> function calculateextcost1() { var v_item1 = parseFloat(document.getElementById("InsertRecordITEMUNITS1").value); if (isNaN(v_item1)) v_item1 = 0; var v_cost1 = parseFloat(document.getElementById("InsertRecordITEMCOST1").value); if (isNaN(v_cost1)) v_cost1 = 0; var v_extcost1 = (v_item1 * v_cost1); document.getElementById("InsertRecordITEMEXTCOST1").value = (v_extcost1); } /* On submitting the webform, the function calculate is executed */ document.getElementById("caspioform").onchange = calculateextcost1; </SCRIPT> <SCRIPT LANGUAGE="JavaScript"> function calculateextcost2() { var v_item2 = parseFloat(document.getElementById("InsertRecordITEMUNITS2").value); if (isNaN(v_item2)) v_item2 = 0; var v_cost2 = parseFloat(document.getElementById("InsertRecordITEMCOST2").value); if (isNaN(v_cost2)) v_cost2 = 0; var v_extcost2 = (v_item2 * v_cost2); document.getElementById("InsertRecordITEMEXTCOST2").value = (v_extcost2); } /* On submitting the webform, the function calculate is executed */ document.getElementById("caspioform").onchange = calculateextcost2; </SCRIPT>
  5. This worked perfectly, thank you so much!
  6. Hi, Sorry for the confusion. I retyped it several times before posting trying to make it clear. I've reread the specs and discussed with the business owner. This is how I now understand it and yes, it is validation. IF PACKTYPE = "SIMPLE" THEN SIMPLEUNIT should be EQUAL to "1" IF PACKTYPE = "COMPLEX" THEN COMPLEXUNIT should be >= to "2"
  7. I need to create an alert on a submission form where, If the drop down box PACKTYPE is = "Simple" then if text field SIMPLEUNIT not equal to 1 Else if PACKTYPE is = "Complex" then a second text field COMPLEXUNITS must be =<2 or greater than 1, which ever is easier. I would like to include alert messages if possible. I am not sure how to write this. I am sure it is simple but I am not familiar enough and not in submission forms. I've only seen items for reports. Any help is appreciated!
  8. Hi Blarney, I have not. I am still waiting for either a miracle or a Eureka moment ...!
  9. Hi Twired, I don't know that I am javascript savvy enough to get this into my form. I updated the scripts above to distinct function names, so I have checkCOST and checkMOQ. Based on my understanding of the articles you gave I added :<form onsubmit="return ((checkCOST() & checkMOQ()) == 1)"> to my footer but I am not able to get anything to work. I did determine that the third script "f_vendorstyle" was acting correctly and was not required in the onsubmit validation. Any additional assistance or guidance would be most appreciated.
  10. Hi! I have multiple scripts for a submission page. When I execute the page I am only able to get one to work at a time. Not all three. I am not sure what I am doing wrong. Any help or advice would be appreciated. I have pasted the scripts below. I have all the scripts in the footer of the page. The first simply checks that the MOQ field is greater than the Inner Pack field. The second checks that cost is less than retail. They third, if the virtual check box is checked, it will copy the data from the Vendor VPN field to the Vendor Style field. <SCRIPT LANGUAGE="JavaScript"> function check() { var v_moq = parseFloat(document.getElementById("InsertRecordMOQ").value); var v_innerpack = parseFloat(document.getElementById("InsertRecordINNERPACK").value); if(v_moq<v_innerpack) { window.alert("MOQ Must Be Less Than The Inner Pack"); return false; } } document.getElementById("caspioform").onsubmit=check; </SCRIPT> <SCRIPT LANGUAGE="JavaScript"> function check() { var v_cost = parseFloat(document.getElementById("InsertRecordCOST").value); var v_retail = parseFloat(document.getElementById("InsertRecordRETAIL").value); if(v_cost>v_retail) { window.alert("Vendor Cost must be less than Retail"); return false; } } document.getElementById("caspioform").onsubmit=check; </SCRIPT> <script> function f_vendorstyle() { if(document.getElementById('cbParamVirtual1').checked) { document.getElementById('InsertRecordVENDORSTYLE').value=document.getElementById('InsertRecordVENDORVPN').value; } else { document.getElementById('InsertRecordVENDORSTYLE').value=""; } } document.getElementById('cbParamVirtual1').onclick= f_vendorstyle; </script>
  11. Hi Caspio World, I feel like this is an easy one, but I am not able to figure out the java scripting. I have two fields on a submission form; Cost and Retail. I am looking for a simple data check script to make sure that cost is always less than the retail amount. If Cost is greater, an alert pops up, "cost must be less." Thank you for any assistance.
  12. I found this scripting that might be helpful. I am uncertain how to translate this for Caspio. function checkEan(eanCode) { // Check if only digits var ValidChars = "0123456789"; for (i = 0; i < eanCode.length; i++) { digit = eanCode.charAt(i); if (ValidChars.indexOf(digit) == -1) { return false; } } // Add five 0 if the code has only 8 digits if (eanCode.length == 8 ) { eanCode = "00000" + eanCode; } // Check for 13 digits otherwise else if (eanCode.length != 13) { return false; } // Get the check number originalCheck = eanCode.substring(eanCode.length - 1); eanCode = eanCode.substring(0, eanCode.length - 1); // Add even numbers together even = Number(eanCode.charAt(1)) + Number(eanCode.charAt(3)) + Number(eanCode.charAt(5)) + Number(eanCode.charAt(7)) + Number(eanCode.charAt(9)) + Number(eanCode.charAt(11)); // Multiply this result by 3 even *= 3; // Add odd numbers together odd = Number(eanCode.charAt(0)) + Number(eanCode.charAt(2)) + Number(eanCode.charAt(4)) + Number(eanCode.charAt(6)) + Number(eanCode.charAt(8)) + Number(eanCode.charAt(10)); // Add two totals together total = even + odd; // Calculate the checksum // Divide total by 10 and store the remainder checksum = total % 10; // If result is not 0 then take away 10 if (checksum != 0) { checksum = 10 - checksum; } // Return the result if (checksum != originalCheck) { return false; } return true; } Source: http://www.logikdev.com/2010/05/13/validate-your-ean-barcode/
  • Create New...