Linux 软件免费装

Date Picker Blocker for Gravity Forms

开发者 Paxrank
更新时间 2026年8月30日 05:51
PHP版本: 8.0 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

booking availability form validation date picker blocked dates

下载

1.0.0

详情介绍:

This plugin requires the Gravity Forms plugin, which is a commercial product sold separately by Rocketgenius, Inc. It does nothing on its own. Date Picker Blocker for Gravity Forms restricts which dates visitors can pick in a Gravity Forms date field. It grew out of the needs of travel businesses, built around real client work at Paxrank, where managing product availability usually calls for finer control than a plain date field offers. That said, nothing about it is travel-specific: it works just as well for any kind of business. The plugin is completely free, and I have no plans to charge for it. Feel free to use it and adapt it however suits you best. Have a suggestion, or found a bug? Report it in the support forum or through the website, and I will look into it as soon as I get a chance. Three kinds of restriction Three levels of scope Every restriction can be applied globally to all forms, to one specific form, or to one specific date field on one form. The two ways scopes combine are deliberately different, because the rules mean different things: Other things it does Developer hooks do_action( 'paxrank_gf_date_blocker_init' ); apply_filters( 'paxrank_gf_date_blocker_should_load', bool $should_load );

安装:

  1. Make sure Gravity Forms is installed and active. This plugin does nothing without it.
  2. Upload the plugin folder to /wp-content/plugins/, or install it through the Plugins screen in WordPress.
  3. Activate the plugin. Activation creates the three database tables it needs.
  4. Go to Settings → Date Blocker in the WordPress admin, or use the Settings link on the plugin's row in the Plugins screen.
  5. Set the global Date Format to match what your forms display, then add your first restriction.

常见问题:

Does it work with every kind of Gravity Forms date field?

Yes, the date picker, the plain text input, and date fields that use day/month/year dropdowns. Server-side validation reads each field's own configured date format, so mixed formats across your forms are handled correctly.

Can I block several dates at once?

Yes. Leave the end date empty to block a single day, or fill it in to block the whole range from start to end in a single record.

What happens to dates in the past?

They are always blocked. The plugin is built for future bookings, and past dates cannot be added from the admin interface either.

Which date format should I choose?

The one your forms actually display, since the setting controls how dates are shown and entered in the admin. Server-side validation is independent of it and uses each field's own format, so a field with a different format still validates correctly.

What happens if Gravity Forms is deactivated?

The plugin detects it, shows an admin notice, and stays inert. It does not throw errors, and your restrictions are preserved for when Gravity Forms comes back.

Does the plugin delete my data when I uninstall it?

Only if you ask it to. Data deletion is opt-in, under Uninstall Options. If you leave that box unchecked, your restrictions and settings survive uninstalling.

I use a page-caching plugin. Does that affect the blocking?

Only the visual layer. The restrictions the date picker greys out are printed into the page, so a cached page keeps showing the restrictions that existed when it was cached — until the cache is purged, a newly added restriction may not be greyed out yet (or a removed one may still look blocked). Enforcement is unaffected: form submissions are POST requests, which bypass the page cache, and the server validates every submission against the live restrictions. If you change restrictions often, purge your page cache after saving, or exclude your booking pages from caching.

更新日志:

1.0.0