Crocoblock / suggestions

The suggestions for CrocoBlock project
195 stars 78 forks source link

JetEngine - Add better post relationships & allow adding relationships through forms #2176

Open HinomaruIL opened 3 years ago

HinomaruIL commented 3 years ago

Hi,

I'm very impressed with your set of plugins and its features. However, from what I see it seems that the way JetEngine handles relationships still has a way to go when compared to Toolset.

Currently, it seems that it is only possible to connect two posts directly, without adding fields to the relationship, and one CPT has to be a 'parent' of the other CPT. My suggestion is that you would implement a similar relationship workflow to what Toolset does, which is much more productive. The way they handle Many-to-Many relationships is by using an intermediary CPT between two post types, to which you can also add custom fields. Granted, this is already technically possible with the current JetEngine, but seems to require too much effort for bulk creation. I'll demonstrate by an example: Let's say I have a film database, and I list Films (CPT) with Creators (CPT) and Characters (CPT). Each CPT has its own entry, but they are also related to each other. Creators include production staff as well as actors. In order to show that a Creator plays a certain Character, I would need to link the two. Now, in JetEngine the way for me to do that would be listing either relationships for Movie>Creator>Character or Creator>Movie>Character in order to create the link. In Toolset, on the other hand, I could add a many-to-many relationship between Creators and Characters, which will create a linking CPT (let's called it "Roles"), which will be the child of both Creators and Characters, possibly also of Movies. Then, I would be able to list this Role with its own custom fields (such as "Main" or "Secondary", which should be specific to the Role and not to the Character that may appear in other movies with different stats). Not only that, Toolset's admin options also allow me to create new Creators and Characters from the movie screen. image (Menus appear in Hebrew in my case but show the point - I have the option to link existing or create new posts from a related CPT).

Granted. this sort of post relationship is already kind of possible with JetEngine. I could manually create a Role CPT and list it as a child of Movies, Characters and Creators. But then, I would have to manually create each role and link it to its parents, moving through many pages to the admin. My suggestion (as a first step that would be the easiest to implement), is to add relationships as a form field type. so that I could simply create a form to link the Role CPT to its parents of each post type. That way I could add a link to the form on the Movie post, "Add New Role", which will lead to a form that creates a child Role (CPT) of the current Movie (CPT), and allows to select other parent CPTs as well.

I think that this feature would be useful for many in different forms - like adding teachers and students' roles to course pages, adding band appearances to events, etc. I'd love to provide feedback if any clarification is needed. Thanks and regards, Amos

developernerds commented 3 years ago

I agree!! I am working on this issue right now as a matter of fact! I have to use both ACF and JetEngine to get certain field I need, so I have to make separate forms. It would be nice to be able to map acf fields to jetengine in forms so if I use ACF frontend form to add related posts on the frontend, it will also make the custom content type post. It only seems to be one way. You can only make a post type with creation of custom content type, but not the other way around. Your plugins are AMAZING and there is SO MUCH I can do with them that I couldn't before without it, but there are just a few super important features we still need. One thing is that we need a switcher field type for the frontend too or the ability to change the look of something depending on a radio, select, or checkbox option. I am trying to make a TO DO list type for users and I have a field that sets whether the task has been finished or not. But I cannot find any way to implement it to make the list items either change to checked completed, or delete from the list completely. I have gone round and round with trying different things between jetengine and acf and i am starting to get discouraged. I am to the point where I am just going to have to do it old school with code. :( Anyways, thanks for all your hard work! I have shared this plugin with TONS of other developers because it is a life saver!! Keep up the good work!