I have created a relationship form between a Course and a Student which I named Attendance. It is a many-to-may relationship that allows me to add custom fields to this relationship. The fields are test grades, makeup paper grades, and grade dates.
However, I need an edit form for the custom fields in the established relationship. For every quarter there are new grading and grading date that needed to be added to that student in relationship to the course. I have hundreds of teachers/instructors and I cannot have them login in from the backend.
So I need an edit form that the teacher/instructor can just add the record in the respective custom field that belongs to that relationship.
Please guide me in that. Thanks
Hello,
You can follow our document to setup a relationship form to edit the Attendance post and change the intermediate post custom fields:
https://toolset.com/course-lesson/front-end-relationship-forms-for-connecting-posts/#deleting-existing-connections-between-posts
Front-End Forms for Connecting Related Posts in WordPress
Thanks, Luo for your response. However, my question goes beyond just connecting posts. That form I have created already. The course lesson/example you gave only shows the connecting posts ability.
My question is, after the post is connected, in my example, student to a course, the instructor needs to add grades. Grades is a custom field in the intermediary post Attendance. I need a way to edit the grades belonging to this existing connected relationship. The year has four quarters, and the instructor needs to add 8 sets of grades during the interim of the course after the posts were connected the first time. This needs to be done on the front end.
Sorry, the document of edit connection was removed, you can try these:
1) Create a relationship form "Edit the connection form", in section "Setting", option "Relationship" choose: Attendance
2) Create a content template "Edit the connection CT", display above form shortcode:
[cred-relationship-form form='edit-the-connection-form']
3) In the single "student" post, display a post view:
- Query "Course" posts
- Filter by post type relationship between "Course" and "student"
- In view's loop, display the "Course" post information + below two shortcodes:
a) Edit relationship link:
[cred-relationship-form-link form='edit-the-connection-form' role_items='$fromViews' content_template_slug='edit-the-connection-ct']Edit this Attendance[/cred-relationship-form-link]
b) Remove relationship link:
[cred-delete-relationship role_items='$fromViews' relationship='attendance']Delete this Attendance[/cred-delete-relationship]
Hello Luo, it worked perfectly. I had to do a workaround (like use the old legacy mode)for these codes that did not work with the toolset blocks (for it always displays an error "This block encounter a fatal error". but I follow the logic. thanks
I have one more detail related to this ticket. I can not get two custom field data to display. It only displays the post title connected in the relationship, and it does not show the two custom fields connected in the intermediary post title. Do I have to open a new ticket?
Thanks
Hi,
Thanks for the update and glad that Luo's suggestions helped.
He is on vacation so I've created a separate ticket for your most recent question and will follow up on it shortly.
( ref: https://toolset.com/forums/topic/split-showing-the-two-custom-fields-connected-in-the-intermediary-post/ )
You're welcome to mark this ticket as resolved and start a new one, for each new question or concern.
regards,
Waqar
My issue is resolved now. Thank you!