Skip Navigation

[Resolved] Only one "Parent" shows in Form Content dialog

This support ticket is created 8 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 5 replies, has 2 voices.

Last updated by jeremyE 8 years, 2 months ago.

Assisted by: Luo Yang.

Author
Posts
#420386
grab 46.png
RID Data Structure.001.png

I have multiple many-to-many relationships set up (see data diagram). These work fine when adding/entering CPTs through the WP-admin interface and in all Views. But, when creating a CRED form (for adding or for editing), only one of these related tables shows up in the Parents section of the Add Post Fields dialog (see grab 46.png) -- it should show seven! All seven many-to-many relationships are set up identically.

If I manually add others to the CRED code, it shows an error message on the output "There was a problem...etc.", i.e. the _wpcf_belongs_xxxx_id objects are not being created as they should.

Remote access is available - please ask.

#420546
FireShot Screen Capture - Edit Patient.png

I did some tidying up and the one "parent" that showed in the dialog has now disappeared, so there are none! All my relationships are there and the WP-admin UI allows me to add and edit records just fine.

So I still need to figure out how to build add and edit forms that mimic the native WP-admin interface, so I can (from a single form) edit the Patient and the assigned Carer, Doctor, Room, etc.

The documentation here (https://toolset.com/documentation/user-guides/cred-forms-for-child-content/) also has a many-to-many structure (Book <> Review <> Reader) but it covers a very different scenario: creating a Review and specifying Book and Reader Parents. I need it to work more like the WP-admin UI (see attached screen grab) - I can edit the Patient record and make "assignments" as needed on that same screen. Do you have any documentation or hints covering this style of form?

#420548

Dear jeremy,

I assume you are using below post type relationships:
1) Parent post type "Patient", "Room"
2) Child post type "Patient Room assignment"

And you are using CRED form to edit/create the "Patient" post, since there isn't any direct parent/child relationship between post type "Patient" and "Room", so you will not see "Room" shows up in the Parents section of the Add Post Fields dialog, I suggest you setup another CRED form for creating child "Patient Room assignment" post, then you will be able to setup it's parent "Room" post, see our document:
CRED Forms for Child Content
https://toolset.com/documentation/user-guides/cred-forms-for-child-content/

#420552

Is there any way to get close to the admin GUI screen (as attached screenshot shows)? For example, could I implement it as multiple forms showing on the same page (i.e add multiple forms in a Layout - the Patient CPT edit form at the type, followed by one form for each assignment?

#420564

Yes, it is possible to display multiple edit form in same page, for example, in the single "Patient" post, you can setup a view to list it's child "Patient Room assignment" posts:
Querying and Displaying Child Posts
https://toolset.com/documentation/user-guides/querying-and-displaying-child-posts/

And in the view loop, display the CRED form for editing child "Patient Room assignment" post:
https://toolset.com/documentation/user-guides/creating-cred-forms/
section "Inserting editing Post Forms and deletion links"
you can choose to show them directly in a post or a page, or to insert a link to the editing form itself. Advanced options provide a way to choose contents to be edited (current post or a specific one).

#421820

Got it... thanks for your assistance.

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