Creating your form
First, we’ll start by creating our form and adding our fields which will include at least one Time field.
If you need any assistance in creating your form, please review this documentation.
Once you’ve added the Time field, click on the Advanced tab and set your Interval. We’ve set our to 15 minutes.
Adding the snippet
In order to automatically disable past times, we’ll need to add a snippet to our site.
If you need any help with how to add snippets to your site, please review this tutorial.
The snippet will look for the form ID of 999 and it will only be applied to the field ID 8 and not only disable the times that have passed for today already but will also round up as well so you don’t get time selections like 9:37 showing up as an option.
You’ll need to update each instance of window.wpforms_999_8 to match your own form and field IDs. If you need help in finding what those IDs are, please check out this tutorial.
And that’s all you need to disable past times! Would you like to also create your own Intervals for the Time field? Check out our tutorial on How to Create Additional Intervals for the Date Time Field Time Picker.
Action Reference: wpforms_wp_footer_end