Skip Navigation

[Resolved] Creating a child post and attaching it to parent

This support ticket is created 4 years, 6 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.

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

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 23 replies, has 2 voices.

Last updated by marcH-4 4 years, 6 months ago.

Assisted by: Shane.

Author
Posts
#1611879

Tell us what you are trying to do?
Create a child post and attach it to a parent

Is there any documentation that you are following?
Toolset documentation, but screenshots don't match docs

Is there a similar example that we can see?

What is the link to your site?
hidden link

#1612631

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi March,

Thank you for getting in touch.

For clarity is it that when you have a parent and want to create a child post for that parent, you want the child post to be automatically assigned to that parent ?

Please let me know.

Thanks,
Shane

#1612719

Yes that’s right, I want to navigate to a single parent in the front end, then fill in a form which populates many child entries either at once or separately .

M

#1612891

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Marc,

Thank you for the clarity.
Though you are not able to create Many children all at once, you can do it one at a time by following the instructions below.

https://toolset.com/documentation/post-relationships/selecting-parent-posts-using-forms-create-child-items/#creating-forms-when-a-parent-post-is-preselected

Please let me know if this helps.
Thanks,
Shane

#1613039

When I view the form editor, it doesn’t show me the relationships drop down. Have I skipped a step?

#1613041

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Marc,

Would you mind allowing me to have admin access to the website so that I can have a look at how the relationship is setup ?

Was it created through types ?

Please let me know.

Thanks,
Shane

#1613107

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screenshot 2020-05-05 at 4.34.31 PM.png

Hi Marc,

The relationship dropdown is actually there on the form. See Screenshot

What you need to do is drag and drop the field to the form and hit save on the form.

Please let me know if this helps.

Thanks,
Shane

#1614081

I see that now, and have got the drop-down to show. How do I load it to default to the parent I want?

#1614121

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Marc,

You will need to follow this instruction below exactly.
https://toolset.com/documentation/post-relationships/selecting-parent-posts-using-forms-create-child-items/#creating-forms-when-a-parent-post-is-preselected

This will guide you on how to get a button on your page that will allow you to click to your child form with the parent pre-selected.

Let me know if you are still not clear or if there is a specific step from the document that you are having issues with.

Thanks,
Shane

#1614839

Thanks, that is now working. I am trying to display the parent and its children. I have followed the documentation at https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/displaying-related-child-posts/ but I'm not clear where I have gone wrong.

#1615369

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Marc,

To get this clear you want to display the Child posts i.e Timesheets on each individual Tasks page ?

Please let me know and we can go from there.

Thanks,
Shane

#1615639

Hi Shane

Tasks are the children of timesheets, SO I want the Timesheet page to display the name of the timesheet and the children, which are Tasks. Marc

#1615655

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Marc,

I checked on this for you.

You've pretty much done everything correctly however you just needed to add the child view i.e the take view inside the timesheet view.

I went ahead and did this and you should be seeing the results on the frontend now.

Thanks,
Shane

#1615809

Thank you for your continued assistanece. I'm nearly there. I want to parent and child in the Timesheet-editor view, not my-timesheets. My timesheets lists all the parents and links through to each, where I want to display the parent title and children.

As I say, I think we're nearly there.

#1615821

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Marc,

To get this clear, you want the Tasks to appear on the Timesheet page.

For e.g if I go here hidden link

You want to list the tasks under this timesheet on this page correct?

Please let me know.
Thanks,
Shane