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.
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
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.
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.
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.