PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

default date of form (set to 2 days in the future)

  1. So I'm working with a pretty custom form. I've got a function in there that is trying to "schedule" the form, and as far as I can tell, it works.

    The draw, it requires a date input into the form. I do NOT want a user to have to select a date. I want the date to automatically be 2 days in the future.

    Say, someone uses the form on Monday, I want the date picker input to be set to Wednesday by default. Is there a way to do that? or even hourly, ie 48 hours?

    Posted 9 years ago on Friday June 15, 2012 | Permalink
  2. In this case, you might want to just populate your date field with a function in your theme's functions.php using the gform_pre_render hook. Before the form is rendered, determine the current date, and set this date field to 48 hours from it.

    Posted 9 years ago on Tuesday June 26, 2012 | Permalink
  3. Hi thirdriver!

    Did you get a solution for it? I'm working on the same thing, only mine needs to be set to expire 30 days to the future. I really don't have background with code so any detailed info would help.


    Posted 9 years ago on Friday June 29, 2012 | Permalink