Summer Sale: Save 20% on any WS Form edition CODE: SUMMER20 View Pricing

Customize Form Behavior in WordPress With Action and Filter Hooks

Modify rendering, validation, actions, and submissions with WS Form action and filter hooks.

  • Pre-render control Modify form objects before a form is rendered, including form-specific pre-render hooks.
  • Submission validation Validate individual fields or entire submissions and return feedback, messages, or redirects.
  • Action customization Adjust Redirect, Webhook, Send Email, User Management, and PDF action behavior.
  • Email output control Modify recipients, subject, message, headers, CSS, template, and attachments for email notifications.
  • Submission event hooks Run logic when submissions are created, updated, posted successfully, or change status.
  • Rendering and assets Enqueue custom CSS or JavaScript and adjust script loading behavior when forms appear on a page.

WS Form includes action and filter hooks that let you customize how forms behave in WordPress. You can modify forms before they render, change submission validation, adjust action output, and respond when submissions are created, updated, posted, or change status.

Hook coverage spans rendering, styling, scripts, variables, translations, exports, redirects, webhooks, email notifications, PDF generation, and submission handling. For example, hooks can modify Send Email recipients, subject, message, headers, attachments, and template output, or change Webhook headers and payloads.

You can also tailor validation and messaging during submission. WS Form supports field-level and form-level validation hooks, custom invalid feedback, custom messages, redirects on validation failure, blocked IP and keyword checks, and hidden fields injected at submit time.

  • Modify forms before render

    Use pre-render hooks to change a form object before output. A form-specific pre-render hook is also available when you want changes to apply to one form ID.

  • Customize submission validation

    WS Form provides both form-level and field-level validation hooks. Validation can return field invalid feedback, messages shown before or after the form, or a redirect.

  • Control email notifications

    Send Email hooks can modify To, CC, BCC, Reply-To, subject, message, headers, CSS, template output, and attachments before an email is sent.

  • Adjust webhook requests

    Webhook hooks let you change the HTTP headers and payload sent with the Webhook action.

  • Tailor PDF output

    PDF hooks can customize the default font, font size, orientation, paper size, filename, and template path used when a PDF is generated.

  • Manage blocked traffic

    Hooks can define blocked IP addresses and blocked keywords, plus customize the message and message type shown when a block is triggered.

  • Extend front-end output

    When a form is present on a page, hooks can enqueue custom CSS or JavaScript. Additional hooks can override footer loading, defer behavior, and footer script attributes.

  • React to submission events

    Action hooks run when a submission record is created or updated, when a form posts successfully, and when a submission status changes to draft, publish, error, spam, or trash.

Real Customer Reviews

Trusted by thousands of WordPress professionals.

  • WS Form is simply the best plug-in in the WordPress universe – period. The support is wonderful, fast, friendly and always available.

    upt2
  • WS Form helped us develop advanced forms to take our marketing and operational efforts to a whole new level.

    willvv
  • Blown away with each project or need I’m able to tackle with WS Form. The advanced functionality is awesome and really opens it up to create complex, dynamic WP websites.

    EZ Smith

Frequently Asked Questions

What can I customize with WS Form action and filter hooks?

WS Form hooks cover form rendering, validation, submissions, exports, scripts and styles, variables, translations, redirects, webhooks, email notifications, PDF generation, and settings-related behavior.

Can I change a form before it renders?

Yes. The wsf_pre_render filter lets you modify a form object before rendering, and a form-specific wsf_pre_render_ filter is also available.

How do I validate submissions with WS Form hooks?

WS Form includes wsf_submit_validate for form-level validation and wsf_submit_field_validate for field-level validation. These hooks can return invalid feedback, messages, or a redirect when validation fails.

Can I customize email notifications sent by WS Form?

Yes. Send Email hooks can modify recipients, Reply-To, subject, message, headers, CSS, template output, email address validation, and attachments before the email is sent.

Can I change webhook requests before they are sent?

Yes. WS Form includes hooks to modify the HTTP headers and the payload used by the Webhook action.

Can hooks help block unwanted submissions?

Yes. WS Form includes hooks for blocked IP addresses and blocked keywords. You can also customize the message shown when a blocked IP or keyword is detected.