Jump to content

lmooring

Caspio Ninja
  • Posts

    38
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by lmooring

  1. Hi, I have two fields that I am trying to make a conditional rule with but am not able to within the rules of Caspio. I have two lookup table I am using for drop down box options and I would like to conditionalize the options available - or the default selection - of drop down B based on the selection in drop down A. I have drop down A - provider types: 10 - Main SFA 12 - Sub SFA 30 - Athletics 40 - Departments 397 - Campus Card I have drop down box B - invoice types: 1 - By Date 2 - By Total 3 - POS Detail 4 - Page Break 5 - Multipage 6 - By CUstomer 7 - Total Only So, if the submittor selects "30 - Athletics" as their provider type I would like the default option for invoice type to be "3 - POS Detail" but they still have the option to change if necessary. I am not sure if this is possible but any help would be appreciated.
  2. I have a question about using multiple JavaScripts in a single submission form. I want to use three different JavaScripts in a single form, but as soon as I enter in more than one the other stops working. For example, in my footer I have one to concatenate email address for the acknowledgement email into a virtual field and one to do a date check to make sure one date is greater than today's date, etc. When I enter the date script the concatenation script stops working and vice versa. I have tried moving the date check script to an HTML box but it does not resolve the issue. Any suggestions or assistance would be greatly appreciated. I am not sure what I am doing wrong here. I have attached my footer scripts for convenience. <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var position1 = document.getElementsByName("InsertRecordStore_Email")[0].value; //alert("position1 :" + position1 ); //alert("position1+ :" + document.getElementsByName("InsertRecordStore_Email")[0].value); var position2 = document.getElementsByName("InsertRecordBiller_Email")[0].value; //alert("position2 :" + position2 ); //alert("position2+ :" + document.getElementsByName("InsertRecordBiller_Email")[0].value); var allpositions = position1 + ";" + position2; document.getElementById("cbParamVirtual3").value = allpositions; } document.getElementById("caspioform").onsubmit=function() { concatenate(); } </SCRIPT> <SCRIPT LANGUAGE="JavaScript"> function checkStart() { var v_sDate = document.getElementById("InsertRecordInStoreSFA_Start").value; var v_eDate = document.getElementById("InsertRecordInStoreSFA_End").value; var sDate = new Date(v_sDate); var eDate = new Date(v_eDate); var nDate = new Date(); nDate = Date.now(); var setToday = sDate.getDate() + 1; sDate.setDate(setToday); setToday = eDate.getDate() + 1; eDate.setDate(setToday); if (sDate<nDate) { alert("SFA start date must be greater than today"); return false; } else { if (eDate<sDate) { alert("SFA end date must be greater than SFA start date"); return false; } } } document.getElementById("caspioform").onsubmit=checkStart; </SCRIPT>
  3. Hi Jan, Thank you so much this works perfectly stand alone but it appears to be stopping my other date check script. I am pasting them both below. Perhaps you could offer some advice on getting both of these to work? They are both in the footer of my form: The one from above: <SCRIPT LANGUAGE="JavaScript"> function checkTenderDate() { var v_aDate = document.getElementById("InsertRecordTenderTurnOffDate_Web").value; var v_bDate = document.getElementById("InsertRecordInStoreSFA_End").value; var aDate = new Date(v_aDate); var bDate = new Date(v_bDate); bDate.setDate(bDate.getDate()-3); if (aDate>bDate) { alert("Tender Turn Off date should be a minimum of 2 days prior to SFA End date"); return false; } } document.getElementById("caspioform").onsubmit=checkTenderDate; </SCRIPT> The one already in the form: <SCRIPT LANGUAGE="JavaScript"> function checkStart() { var v_sDate = document.getElementById("InsertRecordInStoreSFA_Start").value; var v_eDate = document.getElementById("InsertRecordInStoreSFA_End").value; var sDate = new Date(v_sDate); var eDate = new Date(v_eDate); var nDate = new Date(); nDate = Date.now(); var setToday = sDate.getDate() + 1; sDate.setDate(setToday); setToday = eDate.getDate() + 1; eDate.setDate(setToday); if (sDate<nDate) { alert("SFA start date must be greater than today"); return false; } else { if (eDate<sDate) { alert("SFA end date must be greater than SFA start date"); return false; } } } document.getElementById("caspioform").onsubmit=checkStart; </SCRIPT>
  4. Hi I am looking to see if there is a script that would do a date check between two to dates entered into a submission form. I need to have a check to see if date A is a minimum of 2 days prior to date B. If it's not the form can not be submitted and an alert message appears. I attempted to modify a couple other scripts I found but was unsuccessful at getting them to work. Any assistance would be greatly appreciated!
  5. I've finally gotten this to work. I had a typo in one of my parameter names and made one of the changes you recommended above. Thanks so much for your help with this!
  6. Hi, The ields were not required. I have set them all to required and have set their default value to 0.00 on load so that there will be no blank values if the fields are not required to be used be the end user. However, when I have all value fields populated and balanced the script still delivers the alert message that there was an error and then submitted the form when clicking "ok" to the alert. It also does this when they do not balance.
  7. Hi! I was hoping to have the use be able to see the total as the information was entered and then execute the check on submit. But if I am not able to this will work just fine. I did as you instructed and hid the invoice total field. I updated the parameters names to the field names used in my table and inserted into the footer of my data page. When I tested the functionality, whether my totals are equal or not, I receive the pop alert and then when I click ok, the form submits. ? Are you able to assist? Do you need me to send you any information to see?
  8. I have a submission form that will capture a transaction total, 5 separate invoice totals, and freight charged. I would like to create a field that would add all the invoice totals and freight to a grand total. Also with a condition that would not allow the form to be submitted if the transaction total and invoice grand total are not equal. Is this possible in a submission form?
  9. Hi Jan, This worked wonderfully! Thank you so much for your help on this!
  10. Hi Jan, I double checked and yes I have them in my table in all caps. Is this a problem?
  11. Hi Pisaacs, Have you seen this article in the help topics about mobile usage? http://howto.caspio.com/tech-tips-and-articles/mobile-iphone-ipad-android/
  12. Thank you so much for the response. I have tried this in my existing submission form and it does not appear to be working. I am not able to get an error message either so I do not know where the problem lies. I created a test page and table to see if some existing code may be affecting this but I am still not able to get this to work? My test page simply has a start date/ end date and a name text field. I changed the name to the paramater name in front of InsertRecord in the code and placed in the footer of the page. Is there something else I may be missing that I did not update correctly? <SCRIPT LANGUAGE="JavaScript"> function checkStart() { var v_sDate = document.getElementById("InsertRecordSTART_DATE").value; var v_eDate = document.getElementById("InsertRecordEND_DATE").value; var sDate = new Date(v_sDate); var eDate = new Date(v_eDate); var nDate = new Date(); nDate = Date.now(); var setToday = sDate.getDate() + 1; sDate.setDate(setToday); setToday = eDate.getDate() + 1; eDate.setDate(setToday); if (sDate<nDate) { alert("Start Date should be more than Today"); return false; } else { if (eDate<sDate) { alert("Finish Date should be more than Start Date"); return false; } } } document.getElementById("caspioform").onsubmit=checkStart; </SCRIPT>
  13. I have a need to compare two dates prior to a form being submitted but am not sure how to address this. For example, start and end dates. Rule 1 would be that the start date can not be less than todays date. Rule 2 would be that the end date can not be less than the start date or conversly start date can not be greater then end date. Any assistance would be appreciated.
×
×
  • Create New...