[Resolved] How to customise the child post fields shown on a parent edit screen
This thread is resolved. Here is a description of the problem and solution.
Problem:
On the post edit screen of a parent post type where child posts can be added and edited, how is it possible to control which fields of the child post are shown?
Solution:
Choose and edit the parent post type from the list of post types at Toolset > Post Types.
At the bottom where the child post types are set, use the "Select fields" link to choose the fields of the child post that will be shown on the parent post edit screen.
You have a custom field group with two fields (mall name and distance).
You want this field group to be available to 3 different custom post types.
That's not a problem. When you create the field group there is a section "Where to include this Field Group" where you can specify which post types the field group should be assigned to, where you can select all 3 custom post types.
But this has nothing to do with post relationships which you mention in your post.
Can you give me some more details about what you want to achieve?
Toolset doesn't currently support groups of repeating fields directly.
You can achieve a similar result by creating a child post type which has the group of fields assigned to it. By adding multiple child posts to a parent post you effectively replicate the functionality of repeating groups of fields, with the child posts acting as a container element.
If you are on the parent post edit page you can add a child post (in the post relationship section at the bottom). If you want to directly input the fields from your field group here, you can specify that these particular fields should be visible if you edit the parent post type at Toolset > Post types and use the "Select fields" link shown in the screenshot.
That works, and I have visited the page in question.
I'm sorry if I'm being a bit slow, but I still don't understand what the issue is.
You have a CPT of "Landed House" which has a child post type of "Development Detail".
When editing a Landed House post where you can add child Development Detail posts it shows all of the custom fields assigned to Development Detail posts (none of which are name of mall and distance).
Development Detail is also a child post of 4 other post types.
Having established that, could you please explain what you want to see when editing a Landed House post?
Hi Nigel. sorry for confusion, lets drop the Nearby Mall as this backup copy doesnt have this group field.
" Development Detail is also a child post of 4 other post types." - youre right on this focus area.
as you can see the post type :: Private Apartments and Offices, etc has become part of a select field </strong >which is not something i am looking for. is there way to overcome this issue ?
It is including the fields to set the post parents for the other post types, and you don't want to include these, yes?
Then the solution is in my second reply above.
You need to go to edit the Landed House post type (at Toolset > Post types) and in the post relationships section at the bottom use the Select fields link to choose which fields to show. By default they all are. On your site I edited it to show just a subset of the available fields, which you may want to change.
Note that you can repeat this for the other parent post types of Development Details and either choose the same fields to be shown, or different ones, they are stored separately.