Hello and my apologies for the late reply, but I do not work on Wednesdays and Thursdays as you may check on my profile page https://toolset.com/forums/users/jamal-b/
Short answer: We can't really achieve what we want on this ticket, without having some requirements. The ability to mirror user information into the custom post types. Currently there is only one user in the system(interactiveware).
Long answer:
We'll create a user and make him the author of his respective post(MediaPros). Let's work with the "Shereen Bhan". I have created a user for him(shereen: hidden link).
Then I activated the authors' option in the custom post type settings. Check this screenshot hidden link
And made the user be the author of his post/profile(MediaPros) hidden link
I choose this user because his profile(MediaPros) is already connected to an existing enquiry Speaker Opportunity: (hidden link)
This way, we can pull all the data(enquiry, mediapro) in the response form, by using the URL parameter, and the relationship(MediaPros<>Enquiries).
We won't need to pass the MediaPros ID in the URL because we'll pull it from the Enquiry.
I don't think that these fields need to be saved in the Response Form. We should, only, save the relationship/link between the response post and its parent enquiry post. So, we will use some HTML instead of Toolset Forms fields. It would be just text instead of readonly fields.
First, we need to update the link in the "Respond Now" button to use the Enquiry post ID, instead of the"Enquiry ID" fields, that should IMHO be removed from the custom fields. This way we will pass the Enquiry post ID in the URL with the parameter "eid":
<em><u>hidden link</u></em>;
Then, we will update the form to display the Enquiry title and details and the MediaPros title. We will be able to do the above by using the item attribute of Toolset shortcodes, and wpv-search-term shortcode. Read more here:
- https://toolset.com/documentation/programmer-reference/views/views-shortcodes/item-attribute/
- https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-search-term
We can pull the Enquiry details with the following nested shortcodes:
Selected Enquiry ID: [wpv-post-title item='[wpv-search-term param="eid"]']
Selected Enquiry Details:[wpv-post-body view_template="None" item='[wpv-search-term param="eid"]']
Getting the MediaPros title, is a little tricky because we can do nested shortcodes for another level. So, we will use an intermediary content template. A content template will ALWAYS render the information of ONE post. We'll pass the Enquiry ID to this content template. And inside of it, we'll display the parent MediaPros title. Please note that this content template is not assigned to any post type. Check this screenshot hidden link
This is how we will include the content template, not how we pass the Enquiry ID using the item attribute:
[wpv-post-body view_template="Parent MediaPros title" item='[wpv-search-term param="eid"]']
And this is how we will put the MediaPros data inside the content template:
[wpv-post-title item="@mediapro-enquiry.parent"]
However, we need the response to be linked to the enquiry post. So, we will still use the relationship field and hide it using Javascript. Check this screenshot hidden link and we will hide it using the following Javascript in the form, check this screenshot hidden link
jQuery('div[data-item_name="select-@enquiry-response.parent"]').parent().hide()
We need to use the relationship field to make sure that the created response post will be linked to the parent Enquiry post.
I hope this is clear enough to showcase how you can pass the Enquiry ID through the URL, and display its data inside the form. While still ensuring that the created response will be linked to the Enquiry post.
Let me know if you have any further questions.