Updating Posts Using the Post Management Integration

Tip: We recommend using the templates in the Post Management category on the Add New page to create your forms. WS Form will automatically add the form fields as well as creating mappings for populating and updating the post data.

Updating a WordPress post using a form is achieved in WS Form using the Post Management integration. Posts in WordPress represent blog posts, pages or any other custom post you have configured in WordPress.

There are two steps involved when updating a post using WS Form.

WS Form PRO - Post Management - Update a Post

  1. Populate the form with the original post data.
  2. Update the post when the form is submitted.

Choose Which Post to Update

There are three methods you can use to determine which post to update. An explanation of each method and how to configure your form is described below.

Current Post

Use this method if you want to update the post that the form is placed on.

1. Populate the Form

WS Form PRO - Post Management - Populate Form Using Post DataTo populate the form with post data you use the Data tab in the Form Settings sidebar. To do this:

  1. Click the form settings  icon in the top toolbar.
  2. Click on the Data tab.
  3. Check the Populate Using Action setting.
  4. Choose Post Management from the Action To Populate From dropdown.
  5. Choose the the post type you would like to populate data from.
  6. Enter #post_id (or leave it blank) to use the Post ID of the post/page the form is shown on.
  7. Use the field mapping, meta mapping and tag mapping settings to determine which fields, meta and tag (WordPress terms) you would like to populate into which fields of your form. Click the Add  icon to add new mappings.
  8. Click Save.

2. Update the Post

WS Form PRO - Post Management - Update ActionUpdating the post when the form is submitted is done via the Post Management action. To do this:

  1. When editing your form, click the Actions icon at the top of the page. The Actions sidebar will open.
  2. If you do not yet have a Post Management action:
    1. Click the Add  icon to add a new action.
    2. Choose Post Management from the Action pulldown.
  3. Choose the post type you would like to update.
  4. Enter #post_id in the Post ID setting.
  5. Under Status we recommend choosing the Default setting to retain the existing post status. Otherwise you can choose a specific status for the post.
  6. Use the field mapping and other mapping settings to determine which fields you would like to populate into which fields of your form. Click the Add  icon to add new mappings.
  7. Click Save.

 

Troubleshooting

Form Won’t Populate

  • If your form has been saved, it could be overwriting the populated post data. Clear the session ID. Learn more
  • Ensure you have specified the correct Post ID to populate from. Learn more
  • Ensure all fields are mapped correctly. Learn more

Post Won’t Update

  • If you are using a query string parameter to specify the post ID, ensure you are passing that value through by using a hidden field. Learn more
  • Ensure you have specified the correct Post ID to update. Learn more
  • Ensure you have configured the Actions > Post Management settings to use the correct post ID. See above.
  • Ensure all fields are mapped correctly. Learn more