Skip Navigation

[Resolved] Add content to the actual page with frontend post form

This thread is resolved. Here is a description of the problem and solution.

Problem:

How to create a post form while the parent post is pre-selected.

Solution:

Use the "Use create Child Post Link" according to the documentation below.

Relevant Documentation:

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

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.

This topic contains 5 replies, has 2 voices.

Last updated by annaA-2 1 year, 10 months ago.

Assisted by: Christopher Amirian.

Author
Posts
#2547145
screencapture-manuelastaffieri-it-paziente-mario-rossi-2023-02-03-11_49_55.png
Schermata 2023-02-03 alle 11.51.38.png

Hi,
i'm working on a medical website that needs to manage patients and add documents to their pages. He
create users and user pages. Then he can go to the single page to add documents.
But in the post form there is a field which shows name of all patients and each time it has to choose the actual patient.
How can I set that field to directly show the patient related to the page where the form is displayed?

I've attached a print screen so you can see what I mean.

Thanks in advance,
Anna

#2548275

Christopher Amirian
Supporter

Languages: English (English )

Hi Anna,

If you create a Post Edit link on the page that will redirect to the post edit form it should show only the items available for that post if I understand you correctly.

you can learn more about that here:

https://toolset.com/course-lesson/front-end-forms-for-editing-content/ (Use Edit Post Link) shortcode

If your form has a parent/child relationship then you can use the method below:

https://toolset.com/course-lesson/selecting-parent-posts-when-using-forms-to-create-child-items/ (Use create Child Post Link) shortcode

Hope it helps.

#2548851

Hi Christopher,
Thanks for the answer but following those instructions I can't solve it unfortunately.

Patients are post types, diets are repeatable fields of those posts. For each diet a post is not created so I can't use the relationships.

I added the edit form on the patient page itself but the form also shows the other patient posts.

How do I tell that field to only show the patient post where the change is happening?

Thank you very much for helping.

Anna.

#2549557

Christopher Amirian
Supporter

Languages: English (English )

Ok if I understood correctly, you want to show the items only from the post (we call it the parent post) in the repeatable Field Group.

I wonder if you can test this method and see if it works for you?

https://toolset.com/forums/topic/create-a-view-that-lists-all-posts-with-repeatable-field-groups/#post-1191399

Thanks.

#2550071
#2550073

My issue is resolved now. Thank you!