Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Sending a form on a specific date & time

  • 17-01-2015 02:43AM
    #1
    Posts: 0 ✭✭✭


    Anyone got an example of how to send a form on a datepicker date & time?

    Have tried all sorts of google search terms and cannot nail this one.

    thanks


Comments

  • Moderators, Society & Culture Moderators Posts: 9,688 Mod ✭✭✭✭stevenmu


    Generally a form is something that a user interacts directly with, so it isn't usually something that you would schedule.

    The normal way to achieve what you want to do, or what I think you want to do at least, is to store the results of your form, including the data picker, in some intermediate location. Normally this would be a database but could be a file location as well.

    Then, you want some kind of timer job or scheduled task to periodically check your database of file location for any data/transactions which are due to be sent. Depending on your needs this could happen every second, every few minutes, daily, once a week etc.

    So the two things you will need to figure out are, how to save data from a form, and how to create a timer job or scheduled task. There's a lot of ways to do each depending on what technologies you are using and are familiar with.


  • Registered Users, Registered Users 2 Posts: 7,125 ✭✭✭Talisman


    You need to submit the selected date & time in ISO 8601 format so you can be sure that the time cannot be misinterpreted on the server side.

    JavaScript has a Date.toISOString() method which returns the correctly formatted date string. Old browsers (IE8 and earlier) will require the ECMAScript 5 compatibility shim in order to work.


Advertisement