PHP Examples
-
Change Form Submission Limit Settings Using PHP
Sometimes you might want to change form settings dynamically using PHP prior to the form being rendered on your website.
-
Change Tab Labels Using PHP
Sometimes you might want to change a tab label dynamically using PHP prior to the form being rendered on your website.
-
Custom Server-Side Form Validation
WS Form allows you to perform your own server-side validation of submitted fields values.
-
Filter Disposable Email Addresses
Reject form submissions from unwanted email addresses using this WS Form filter.
-
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 Select, Checkbox and Radio Fields Using PHP
You can use WS Form functions to dynamically populate select, checkbox or radio fields.
-
Populate the Default Value of a Field Using PHP
You can use WS Form functions to dynamically set the default value of fields.
-
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 Registration
When a user registers on your website using the User Management add-on you can redirect existing users by their role or other criteria.
-
Redirect Users by Role After Login
When a user logs in to your website using the User Management add-on, you may wish to redirect users by their role or other criteria.
-
Setting Which Post ID to Populate With Using PHP
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.