Submission To Post
Create WordPress posts from form answers.
Submission To Post creates WordPress posts from Forms submissions. Use it for guest articles, job listings or directory entries. Each submission stays in the Submissions list too.
XPAC Forms must be active. All settings are in the form editor's Submission To Post panel in the document sidebar.
Set it up
Open Submission To Post and press + (Add action) to open Create Configuration.
Under Post Settings, choose the Type of post to create. Keep Status as Draft if you want to review submissions before publishing.
Under Fields Mapping, add a row for each answer you want to use. Choose the destination in Post Field and the source answer in Form Field. Start by mapping Post Title to a required form field.
Under Taxonomies, add an Items row for any terms that should apply to every post, such as a category.
Add more configurations to create several posts from one submission. Use the pencil to edit, the red X to remove, or the on/off switch to pause a configuration. With Forms' conditional logic, you can run a configuration only when the answers match its conditions.
Published posts go live without review
Published makes accepted visitor content public when the background delivery runs. Use Draft or Pending review when someone should check it first.
Post settings
These settings apply to every post the configuration creates.
| Control | Options and defaults |
|---|---|
| Type | The post type to create. Required; defaults to Post |
| Status | Published, Draft, Pending review, Scheduled or Private. Defaults to Draft |
| Visibility | Public or Password Protected. A protected post needs a password |
| Format | Defaults to Standard. Only shown for types that support post formats |
| Date | Entry Date or Custom Date & Time |
| Author | Form owner or Custom User |
| Comments | Allow comments. Off by default |
| Trackbacks & Pingbacks | Allow trackbacks and pingbacks. Off by default |
Scheduled with Entry Date publishes immediately. Published with a future Custom Date & Time schedules the post. Custom dates must be valid.
The form owner's permissions apply. They must be allowed to create the post type and assign its terms. Custom User requires permission to edit other authors' posts. Without permission to publish, published, scheduled and private posts become drafts.
Fields Mapping
| Post Field | Answer used for |
|---|---|
| Post Title | The title |
| Post Content | The body |
| Post Excerpt | The excerpt |
| Featured Image | An image from a File Upload field |
| Meta Field | A custom field; enter its name |
| A taxonomy name | Existing terms matched by ID, slug or name |
Password and confirmation fields cannot be mapped. If several rows target the same field, the last wins. Taxonomy mappings combine their terms instead.
- Title, content or excerpt: at least one must have a value for normal post types. Map the title to a required field to avoid empty posts being rejected. WordPress removes scripts and disallowed HTML from these fields.
- Taxonomies: mappings use existing terms; they do not create new ones. Unmatched answers are ignored. Use a dropdown or checklist with your terms as choices.
- Featured Image: only File Upload fields are supported. The first valid image uploaded through this form is used. The form owner needs upload permission. The image becomes public, so do not map confidential uploads.
- Meta Field: use your own field names. Spaces become underscores. Protected keys,
usually starting with
_, are rejected. The namestitle,content,excerptandfeatured_imagefill those post fields instead of creating custom fields. Custom-field values are not filtered like post content; validate and escape them in the code that uses or displays them.
Check delivery
Posts are created in the background after the submission is saved. The visitor may see the success message before the post exists. WP-Cron or a server-cron replacement must be running.
Check XPAC → Forms → Deliveries for the result. If a delivery fails, read its error, fix the cause and retry. Common causes are empty content, missing users or terms, invalid settings, and lost permissions. The saved submission is still available; the visitor does not need to resend it.
Configurations run in order. On retry, completed configurations are skipped. Editing or reordering a configuration makes it new work, so retrying after those changes may create another post. Other integrations run separately; an email or webhook may run before the post exists.
For developers
Settings are stored in the form's form_settings post meta under
submissionToPost.items. Use xpac_forms_action_item_status to control whether a
configuration runs, and WordPress's wp_insert_post_data or wp_insert_post hooks to
customize post creation.