Extending WPForms the maintainable way
How a WPForms submission is processed
When a visitor submits, WPForms sanitizes the fields, runs validation, saves the entry if storage is enabled, sends notifications and then fires a completion action. Each stage has a hook. Validation rules attach to the processing stage, where an error can be set against a specific field so the visitor sees it in place. Integrations and follow-up tasks attach to the completion action, when the entry already has an ID. Knowing which stage a requirement belongs to is most of the job. A CRM call placed in the validation stage, for instance, would fire even when the form is later rejected.
Target forms by ID and survive edits
Custom code has to know which form and which field it applies to. Field labels change, so we key on form and field IDs and keep them in one settings array at the top of the plugin, or on a small admin screen when a client wants to manage the mapping. If a marketer deletes a field our code depends on, the plugin logs a warning instead of failing in silence. That one habit removes most of the breakage we see on sites with pasted snippets.
Smart tags and prefilled data
Smart tags insert dynamic values into defaults, notification emails and confirmations. Registering your own tag is a clean way to bring in data WPForms does not know about: the account manager for a logged-in customer, the product the visitor came from, a reference number generated at submit time. We prefer a custom smart tag over hard-coding values in a template, because the marketer can then place it anywhere in the builder.
Payments need a second confirmation
For paid forms the amount is recalculated on the server from the submitted choices, never read from a hidden field. Anything that should happen only for paying customers, such as creating an account or sending a license key, is triggered after the gateway confirms the charge. We test declined cards, duplicate clicks, closed tabs and refunds, and we check that the entry and the payment record tell the same story.
Integrations and entry storage
WPForms keeps entries in its own tables in the paid editions, which makes custom exports and reports easy to build. For outbound integrations we use the official add-on where it covers the need and write a connector where it does not, with a log and a retry for each delivery. When a requirement grows past what a form should do, such as approvals in several stages, we may suggest Gravity Forms or a small custom WordPress plugin instead of bending WPForms further.