Jump to content

abitaquest

Members
  • Posts

    20
  • Joined

  • Last visited

  • Days Won

    2

abitaquest last won the day on October 9 2013

abitaquest had the most liked content!

abitaquest's Achievements

  1. For anyone else affected by this particular change, here is the working script and notes, courtesy of the Caspio folks.
  2. Thanks very much for that. With AJAX loading allowed, it does show the error message briefly ("Must be at least 3 weeks," etc.), but then it goes right ahead and submits the form anyway. With AJAX loading disabled, it submits, and no error message appears. Got an idea for stopping the submit from happening when an error appears?
  3. Hi, all — The upcoming deprecation of the "Disable AJAX loading" button affects some of my forms. With AJAX loading, the following script (to require that forms be submitted three weeks in advance) will do nothing. It works without AJAX running, though. Here's what they all use: <SCRIPT LANGUAGE="JavaScript"> function check_date() { var entered_value = document.getElementById("InsertRecorddateNeeded").value; var entered_date = new Date(entered_value); var three_week_date = new Date(); three_week_date.setDate(three_week_date.getDate() + 20); if(entered_date < three_week_date) { alert("Must be at least 3 weeks in future"); return false; } } document.getElementById("caspioform").onsubmit=check_date; </SCRIPT> I believe the .onsubmit portion at the very end is the issue. Anyone know how to modify this so it will still work while AJAX is running? Thanks much! BTW, I know 20 days isn't 3 weeks. My users can't seem to wrap their head around that, though. ;-)
  4. Hi, all. I'm looking for help customizing the email notifications that go to the user after form submissions. I want different users to get different email contents, depending on how they answered a question in the form. For example, if one of the fields asks the user to select a year (2022 or 2023), then the email the user receives would say something like, "Thanks for signing up for the 2022 event. Here is a list of sponsors for 2022" ... followed by the sponsors for that year. But if 2023, were selected, the user would then see a completely different set of sponsors, specific to that year. (I know how to display only the year that was chosen in the form, since that's just a straight insert.) Thanks in advance!
  5. Got that covered, too. Thanks again, @Vitalikssssss
  6. Thanks, @Vitalikssssss. I appreciate the help. I don't think that's my issue here, though. My table is only 304K, and it contains about 800 rows.
  7. Hi. I have scheduled tasks that export a single table each day and upload it to a remote server as a zipped .csv file. It's been running for years without issue. In the past two days, the upload has been happening, but the zipped file won't open. I thought I got around the problem by telling the system not to zip it first. (I can work with the raw .csv.) However, when that happens, I only get a small portion of the .csv records, not the full table. I think the two may be related, and that the exports are stopping before they're complete, resulting in incomplete .csv files as well as .zip files that can't be expanded. Running the scheduled tasks on demand produces the same results. I can get the data I need by going to the table and exporting directly from there. But since I need to automate this so that it runs twice daily, that's only a temporary solution, at best. (Note: This isn't happening with only single table, but with all similar tasks.) Any ideas?
  8. Hi, edujobs2k10 — This is untested, but it should work. I only changed the variable name and set "permitted_date" to be today's date plus 0 days, then changed the text of the error message. The user should now only be allowed to select today or a day in the future, nothing in the past. First, be sure that AJAX isn't allowed to run on your form. Then, paste the following into your form's footer: <SCRIPT LANGUAGE="JavaScript"> function check_date() { var entered_value = document.getElementById("InsertRecorddateNeeded").value; var entered_date = new Date(entered_value); var permitted_date = new Date(); permitted_date.setDate(permitted_date.getDate() + 0); if(entered_date < permitted_date) { alert("Cannot be a date in the past"); return false; } } document.getElementById("caspioform").onsubmit=check_date; </SCRIPT>
  9. You're right, IMDora! I had allowed AJAX to run on that form after the most recent release. Disabling AJAX put it back the way it belonged. Everything works again! I can't believe I didn't think of that myself. Much appreciated!
  10. Years ago I added some JavaScript to my forms to prevent clients from selecting a "due date" that isn't at least two weeks in the future. Recently that code has stopped working, and all submissions are allowed through, regardless of the date selected. I think this may be tied to the recent Caspio updates. At least, that's all that I can see; the forms themselves haven't changed. Below I'm pasting my JS, which resides in the footer area of my forms. Any ideas would be greatly appreciated. Thanks! (BTW, I know two weeks is 14 days, not 13. But my users don't seem to recognize that, so I made this small allowance.) <SCRIPT LANGUAGE="JavaScript"> function check_date() { var entered_value = document.getElementById("InsertRecorddateNeeded").value; var entered_date = new Date(entered_value); var two_week_date = new Date(); two_week_date.setDate(two_week_date.getDate() + 13); if(entered_date < two_week_date) { alert("Must be at least 2 weeks in future"); return false; } } document.getElementById("caspioform").onsubmit=check_date; </SCRIPT>
  11. I've been customizing my default stylesheet for accessibility. I've modified my buttons so that they're very readable on desktops using all browsers I've tried. But when I load my forms from my phone, the buttons take on a weird gradient that gives a rounded appearance to the button. This is not what I want, as it's much less legible. Anyone know how to turn off this default for mobile devices ... or at least where the style is coming from? I don't see it anywhere in my CSS. Thanks!
  12. This is perfect! Thank you, iren! You've saved my team a mountain of headaches.
  13. Hi, all. So, I need to make the calendar date selection tool available to my form's users, but I don't want them to select a date that is less than two weeks in the future. In other words, if today is Sept. 10, the earliest date they should be able to enter/select is Sept. 24. Ideas? Thanks much!
  14. Hi. I need to collect data from several different drop-downs, then combine the results into a single array in my data table. How would I do that? Example: If I collect 5 as the value for dropdown_1, and 3 for the value of dropdown_2, and 4 for the value of dropdown_3, I would need to be able to use that to create an array in another field (dropdown_values) such as: 5, 3, 4 I'm guessing this is a javascript thing. Any idea how to do that? Thanks for any help.
×
×
  • Create New...