Skip Navigation

You can edit any Post with CRED forms even if the Forms are assigned to specific Post Types only

Resolved

Reported for: Toolset Forms 1.9.5

Resolved in: 1.9.6

Topic Tags: Toolset Forms

Symptoms

If you assign a CRED Form to edit only one specific Post Type, and then insert this Form using a shortcode by passing the ID of the post to edit, you can actually select a post that belongs to a Post Type that this form is not supposed to edit.

If this form is then used, it will edit the current page where the Form is shown, instead of the post with an ID that was passed to the shortcode.

The following example illustrates this behavior:
– CRED Form is set to edit posts belonging to the “Events” post type.
– There is also a regular WordPress Post with an ID of “69” in your website. This means that it does not belong to the “Events” post type.
– You insert the CRED Edit Form into a page called “My Page”, using a shortcode, like this:

– If you now submit this form you will edit the page where you inserted the shortcode (i.e. “My Page”) and not the post with the ID of “69”.

Workaround

This issue will be solved in both the user interface and on the front-end in one of the upcoming CRED releases.

For now, you can apply the following hotfix to the CRED Plugin.

1. Download this patch.
2. Upload it to your site’s ../wp-content/plugins/cred/application/models/form/ folder and replace the existing files.

Comments are closed