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
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.
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.
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.
My issue is resolved now. Thank you!