Skip Navigation

[Resolved] Nested Custom Fields

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 9 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 -
- - - - - - -

Supporter timezone: Europe/Madrid (GMT+01:00)

This topic contains 7 replies, has 2 voices.

Last updated by coderD 9 years, 1 month ago.

Assisted by: Caridad.

Author
Posts
#285907

Is it possible to have a nested custom fields?

e.g:
I have a "image" custom field (checked: Allow multiple-instances of this field) which has another 3 "single" line fields.

Whenever an additional image is added. The 3 "single" line fields will appear as well.

#285938

Its possible in a different way.

You need to create a new Custom Post Type with the single image and the 3 single line fields.
Then you can repeat the group of fields each time you add a child.

Please let me know if you are satisfied with my reply and any other questions you may have.

Regards,
Caridad

#286187

When you state add a child to repeat the group of fields.
Do you mean to create a child CPT or something?

If yes, that would not resolve my issue if my CPT's child post has content to display as well.
And what if I am using a Page instead?

If no, may I ask you how I should create the desired structure custom fields accordingly?

#287659
fields-table.png
child-custom-fields.png

I think there is a misunderstanding. Let me try to explain better.

1) If you already have child content, don't re-use it for this. Create an extra custom post type just to hold the repetitions of images and single line fields.

2) After you have defined the child custom post type just for images, edit the parent post type and select the fields you want to show up in the editor (child-custom-fields.png)

3) You can add posts to this child custom post type directly from the parent in the fields table. Have a look at the screenshot attached (fields-table.png)

I think this is just what you are looking for, let me know if you need more help implementing this.

Also let me say that we are currently working on making a better user interface to add child posts. You should see improvements in our next major release.

Please let me know if you are satisfied with my reply and any other questions you may have.

Regards,
Caridad

#287728

Basically what I want is shown on fields-table.png.

May I ask how you go about setting the custom fields that way?

#288957

You can see in the second screenshot.

Once you have setup your parent and child custom post types, you just edit the parent post type to "Edit fields" that will be visible in the "Fields table".

Let me konw if you need more help with this.
Regards
Caridad

#290107

Dear Caridad

Thanks.

#291235

Dear Caridad

May I checked with you if that child custom fields are able to be set for "Page" as well?

The forum ‘Types Community Support’ is closed to new topics and replies.

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