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.

Gravity Forms Time Field Parameters

  1. Hi There

    I have a client who uses the forms for members of their designated driver service to book a collection. As it is online he wants to prevent people from booking less than 5 hours in advance of pickup. This means that the form must not allow the user to select anything within 5 hours of the current time.

    How do I go about adding this kind of functionality?

    Posted 12 years ago on Thursday August 23, 2012 | Permalink
  2. David Peralty

    We don't have anything like this built into Gravity Forms. You would have to have a custom script written to hook into our hooks to make something like this happen. You would want to have a drop down field that is prerendered by a function grabbing the current time, and creating a list of options based on how many options you want to give users (15m intervals? 30m...?) and then fill the drop down field with the values using gform_pre_render.

    Posted 12 years ago on Thursday August 23, 2012 | Permalink
  3. Oh wow. I have absolutely no idea how to go about doing that. I will have to speak to some other people I know who are more involved in the coding side of things than me.

    Posted 12 years ago on Thursday August 23, 2012 | Permalink
  4. OK, please let us know here if you need any more pointers.

    Posted 12 years ago on Friday August 24, 2012 | Permalink