Skip Navigation

[Resolved] Multi page form: form type and post type do not match

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to use multiple Forms to produce a multi-step Form on multiple pages, but the steps in another ticket lead to an error that says Form type and post type do not match. @https://toolset.com/forums/topic/multi-page-cred-form-or-save-button-for-long-form/#post-298832

Solution:
The process for inserting edit post Forms on your site has changed a bit since that post was published. Now, you should add the Edit Form to an unassigned Content Template or Template Layout. If your site uses Layouts, create a blank Template Layout that includes your Edit Post Form. If your site does not use Layouts, create a blank Content Template that includes your Edit Post Form. Then, you will access those Forms by going to the post URL with a special URL parameter applied.

With Layouts (change 12345 to match your Layout ID):
@http://yoursite.com/your-post/?layout_id=12345

Without layouts (change 67890 to match your Content Template ID):
http://yoursite.com/your-post/?content-template-id=67890

So the code in that ticket should be changed like this with Layouts (change 12345 to match your Layout ID):

$arr = array('layout_id'=>12345);

Or like this without Layouts (change 67890 to match your Content Template ID):

$arr = array('content-template-id'=>67890);

Relevant Documentation:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_success_redirect
https://toolset.com/forums/topic/multi-page-cred-form-or-save-button-for-long-form/#post-298832

This support ticket is created 5 years, 6 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by timM-9 5 years, 6 months ago.

Assisted by: Christian Cox.

Author
Posts
#1104549

Hi!

I'm trying to make a multi page CRED form as described here: https://toolset.com/forums/topic/multi-page-cred-form-or-save-button-for-long-form/#post-298832

The redirect works perfectly, but the second page gives a 'form type and post type do not match' error. It seems that the second part of the form doesn't knows it needs to edit the post that was created in the first part of the form.

Do you maybe have some suggestions to get this error fixed?

Thanks a lot! 🙂

#1104769

The process for inserting edit post Forms on your site has changed a bit since that post was published. Now, you should add the Edit Form to an unassigned Content Template or Template Layout. If your site uses Layouts, create a blank Template Layout that includes your Edit Post Form. If your site does not use Layouts, create a blank Content Template that includes your Edit Post Form. Then, you will access those Forms by going to the post URL with a special URL parameter applied.

With Layouts (change 12345 to match your Layout ID):
http://yoursite.com/your-post/?layout_id=12345

Without layouts (change 67890 to match your Content Template ID):
http://yoursite.com/your-post/?content-template-id=67890

So the code in that ticket should be changed like this with Layouts (change 12345 to match your Layout ID):

$arr = array('layout_id'=>12345);

Or like this without Layouts (change 67890 to match your Content Template ID):

$arr = array('content-template-id'=>67890);
#1104797

Hi Christian,

Thanks for the quick solution! It works perfectly. 🙂

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.