Add programmatic form actions
Programmatic forms support the shared email, storage/retention, redirect and presentation behavior supplied by the normalized configuration.
Email routes
Use admin_routes for site recipients and client_routes for a submitter message. Each route can define its recipients, subject, message/data inclusion, upload policy and conditional behavior supported by POM Forms.
Field values are referenced through form merge tags such as:
{{field:contact_email}}
{{field:message}}
{{meta:form_name}}
Use an authorized address on the site's domain as From and a validated submitter field as Reply-To when replies are expected.
Storage and retention
Programmatic forms follow the global POM Forms storage policy unless store_submissions_override and retention_override_days intentionally define an allowed override. File storage remains separately controlled. Document every copy created by email, WordPress storage and the owning integration.
Redirect and feedback
Use normalized configuration for success/error messages, optional redirect, loading indicator, scroll-to-message and submit-button behavior. The visitor must receive an understandable terminal state even if an email destination fails.
Deliberate exclusions
pom_render_programmatic_form() forces:
$config['webhook_enabled'] = false;
$config['create_post_enabled'] = false;
Use a saved POM form when editors need those workflows. Do not re-enable them after the preparation helper or call private submission functions directly.