Skip Navigation

[Resolved] [CRED] Change post-type of form dynamically and/or skip post-type match

This support ticket is created 8 years 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
- 9:00 – 10:00 - - - - -
- - - - - - -

Supporter timezone: Africa/Cairo (GMT+02:00)

This topic contains 4 replies, has 3 voices.

Last updated by Mohammed 8 years ago.

Assisted by: Mohammed.

Author
Posts
#395408

I would like to be able to do one of 2 things:

- when edit form is loaded, assign to the form a different post type dynamically (hook?)

- when edit form is loaded, skip post-type match verification with current post, assign a different post-type to the form before save (the assigning part could be done through a hook, like I did here https://toolset.com/forums/topic/cred-how-to-assign-a-post-type-to-form-programmatically/)

Currently, I cant use a function to assign a different post type on save, because CRED performs a check for post-type match (form = current post type), and doesnt display the form at all.
"Edit form link can not be displayed (post type mismatch)."

The reason is because I have different post types, but theyr content/fields is the same, so I dont want to have to mantain 5 forms that are all the same, I want to use just one, and then simply change post type of the form, dependong on which current post type I edit.

#395588

Dear Sanny,

As you can see there isn't such a built-in feature within CRED, one CRED form can only edit one post of one specific post type, you can not use same CRED form to edit post of other post types.

If you agree, we can take this as a feature request, and I can put it into our to-do list. thanks

#398726

I know that normally you cant use the same form to edit different cpt posts.
However, I found a way to create different cpt posts, with the same form.
So, technically, editing shouldnt be too far from creating.
It only takes a hook before the form is initialized.

Add it as a feature if you want, it would be great and very handy when dealing with many forms.

#398917

Thanks, I put it into our to-do list as a feature request, our developers will take care of it. but there isn't any ETA for it.

#399541
Post Forms18 15.15.12.png

Hello Sanny,

I’m Mohammed Toolset support second tier and I have been escalated to this thread. I’ll give my best to help you to achieve your needs through Toolset components.

We have an option in the Post forms list screen to clone the form. Please check the attached screenshot.
Please let me know if this works with you.

Thanks.

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