Skip Navigation

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

Relevant Documentation:
https://toolset.com/documentation/user-guides/creating-post-type-relationships/

This support ticket is created 7 years, 1 month 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 19 replies, has 2 voices.

Last updated by Akhil 7 years, 1 month ago.

Assisted by: Nigel.

Author
Posts
#587539

HI Noman,

: whats the best way to create post/child relationship/ to many CPT ..

i followed this https://toolset.com/documentation/user-guides/bulk-content-editing-with-fields-table/

it was fine when ONLY one CPT is selected , if i select few the CPT is displayed as the selection field inside .

is this the limitation of toolset ?

What i would like is to have a custom field group " nearby mall" attached to 3 CPT.

the group field contain two field. 1. name of the mall, 2. distance

this two field should be available for the 3 CPT.

thanks.

#587627

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

I'm not sure if I fully understand your question.

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?

#587629

Hi Nigel.

The mall name and distance is a repeating field .
I miss this part .

Can I do a direct repeating for a set of 2 field or more ?

Thanks

#587639

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screen Shot 2017-11-08 at 13.55.08.png

Thanks for the clarification.

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.

Note that this workflow will be significantly improved when the new Types version is released (https://toolset.com/documentation/user-guides/creating-repeatable-field-groups-and-post-types-relationships-with-types-beta/).

#587678

Hi. Yes tried the above but selecting the cpt , the cpt become part of a field which become very confusing.

Any solution.for this ? Thanks

#587681

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Could you show me a screenshot?

I'm not sure what you mean.

#587697

i can give you acess to see at my staging site,

#587702

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I'll mark your next reply as private to get credentials from you.

Which page should I be looking at?

#587712

apologies. pls drop the 4 from the username. thanks

#587719

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Dropping the 4 I still cannot access, the password or the username appear to be incorrect.

Your next reply is private again.

#587723

pls try again. thanks.

#587733

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

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?

#587737

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 ?

#587742
Screen Shot 2017-11-09 at 12.15.05 am.png

scrrenshot attached

#587744

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

OK, now I understand!

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.