Skip Navigation

[Resolved] Views Loop CPT Edit – Form type and post type do not match

This support ticket is created 6 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 2 replies, has 2 voices.

Last updated by markR-11 6 years, 2 months ago.

Assisted by: Nigel.

Author
Posts
#1140127
cred-update-post.png

I am trying to: Show an edit custom post type CRED form when the logged in user has one of these posts (therapist listing) already. Query Filtering by the post author matching the logged in user.

Link to a page where the issue can be seen: Can show in private

I expected to see: The update / edit CRED form

Instead, I got: Form type and post type do not match error message

Background information: I am making a site whereby each user can have one of a specific custom post type (therapist listing). The view is set up to query all posts with post author matching the logged in user. This works fine if the user does not have a post yet, whereby they see the Add Custom post type CRED form normally. If they do have one of these posts already however, the view is set up to show them the Update/Edit Custom Post Type CRED Form instead. Screenshot attached shows how I have this set up.
If I specify a post using post=# in the cred form shortcode, the update custom post type CRED form works fine, but it is obviously not doing this dynamically. I need it to here.

#1140306

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Mark

I'm not sure why you have inserted the edit form shortcode within the wpv-items-found shortcode but outside of the wpv-loop tags.

If you move the edit form shortcode inside the wpv-loop tags then it should work.

#1140444

Nigel,

I am not sure why I did that either -- thank you for picking out the bonehead mistake there.

Appreciate this,
Mark