Use the Run WordPress Hook action to run a WordPress action or filter when a user saves or submits a form. This gives developers a flexible way to run custom PHP code from a WordPress form workflow.
You can choose whether the hook runs on save, submit, or both. WS Form also lets you choose a filter or action hook type, enter the hook tag, and decide whether it runs before submission creation, before other actions, or after other actions.
When using a filter, WS Form passes the form and submit objects to your hook. Your filter can return an updated submit object, a spam level from 0 to 100, an array for messages, field value changes, or redirects, or a value that halts further action processing.
Action hooks also receive the form and submit data, making it possible to retrieve submitted field values and process them in your own PHP code.