Knowledge Base
Find answers, learn new features, and explore developer resources.
PHP Examples
- Change Form Submission Limit Settings Using PHPPRO
Sometimes you might want to change form settings dynamically using PHP prior to the form being rendered on your website.
- Change Tab Labels Using PHPPRO
Sometimes you might want to change a tab label dynamically using PHP prior to the form being rendered on your website.
- Create a Form Recipient Selector Using PHP
In this tutorial we'll show you how to allow a user to select a recipient using the wsf_action_email_to filter hook.
- Custom Server-Side Form ValidationPRO
WS Form allows you to perform your own server-side validation of submitted fields values.
- Data Sources: WordPress Filter HookPRO
The WordPress Filter Hook data source allows you to dynamically populate a data grids with your own data for fields such as Select, Checkboxes and Radios.
- Enable and Disable Dates and Times Using PHPPRO
This tutorial provides code samples for disabling and enabling dates and times in Date / Time fields.
- Filter Disposable Email Addresses
Reject form submissions from unwanted email addresses using this WS Form filter.
- How to Populate a Field with a New Post ID
How to populate a form field with a newly created post ID.
- Manipulate Submission Data Using WordPress Filter Hooks
When WS Form read or writes submission meta data, it can be filtered using WordPress filter hooks.
- Populate the Default Value of a Field Using ACF Option Values
You can use WordPress filter hooks, WS Form functions, and ACF option page values to dynamically set the default value of fields.
- Populate the Default Value of a Field Using PHP
You can use WS Form functions to dynamically set the default value of fields.
- Preventing Users from Saving Markup in the Layout Editor
If you do not want to allow users to save markup in WS Form settings, use the unfiltered_html capability in WordPress.
- Process Submit Data with a WordPress Hook
You can use the ‘Run WordPress Hook’ action in combination with some simple code to intercept submission data and use it in your own PHP scripts.
- Redirect Existing Users by Role During RegistrationPRO
When a user registers on your website using the User Management integration you can redirect existing users by their role or other criteria.
- Redirect Users by Role After LoginPRO
When a user logs in to your website using the User Management integration, you may wish to redirect users by their role or other criteria.
- Run WordPress Hook ActionPRO
The Run WordPress Hook action runs a WordPress action or filter when a user saves or submits a form.
- Setting Which Post ID to Populate With Using PHPPRO
In this tutorial we show you how to change the 'Post ID' setting found in Form Settings > Data > Populate Using Action by using a simple PHP script.
- Show Form Submission Count for a Specific Form
A PHP example showing how to create a shortcode that returns the total number of submissions for any form ID.