Hooks

Docs Hooks Pro · PHP hooks

modal_kit_pro_form_daily_limit

filter

Pro

PHP

Change how many entries one form accepts per day through your site. 1,000 by default.

Runs for each entry the site relays (POST modal-kit-pro/v1/submit), after the bot check, the email address and the required fields pass. It holds back list bombing, which a per-visitor limit can’t stop. Days are counted in UTC.

Only entries that go through the site count: forms with a bot check, relayed services such as MailPoet, and webhooks. Forms that post straight from the browser to a service aren’t limited here.

Parameters

Parameter

Description

$limit

int

Entries per form per day: 1000.

$modal_id

int

The modal’s post ID.

$form_id

string

The Form block’s formId attribute.

Returns

int The limit, cast to an integer. 0 or less refuses every entry.

Example

Raise it for a launch waiting list

PHP

add_filter(
  'modal_kit_pro_form_daily_limit',
  function ( $limit, $modal_id ) {
    if ( 'launch-waitlist' === get_post_field( 'post_name', $modal_id ) ) {
      return 20000;
    }

    return $limit;
  },
  10,
  2
);

Good to know

When a form is full, visitors see “This form is taking a break. Please try again tomorrow.” (HTTP 429).

Applied in modal-kit-pro/includes/Submissions.php.

Need a hook that isn’t here?