Hello,
We come from: https://toolset.com/forums/topic/reply-a-custom-type-with-messages/ and https://toolset.com/forums/topic/send-page-title-to-next-page/
I have a page created with a post form, that post form obtains user data from a parameter URL from a custom page
Among that information that the form passes to the page, it is the user's email.
I would like that the author of the initial page, could see the page that has been created through him. But I don't know how to show that page created in the view. It could only be seen by the author of the original post (the owner of the email that I sent via the URL to the form)
<b>How it works now: </b>
User Leo creates the page Enterprise.
Inside Enterprise, que have a contact buttom.
Visitor clics on contact buttom.
Info passes to next page on param URL (ie: ****/?contact_id=1346).
Post form receive the info and include on the form the author info (info: author email).
When visitor submit the buttom, a new page is created (inside custom post type: Mensajes directos).
Page is created.
<b>What i need? </b>
I need a filtered view of this custom types called 'Mensaje directo' so that the user who created the Enterprise page can see their received messages (pages which forms created).
I tried filter by author page = current author but that doesnt work because view tooks second author and not the original author (who created Enterprise).
Can you help me?
Thank you
Hello and thank you for contacting the Toolset support.
You will need to have nested views, you can't get this with one view and some query filters. Unfortunately, nested views are not yet supported in the blocks editor. You will need to create these views with the legacy editor.
The first view will search for enterprise posts where the author is the currently logged-in user. Inside of the loop you put a view that will look for "Mensajes directos" with a query filter on the posts related to the current post in the loop(which is the enterprise post). Does it make sense?
Yes, i think that it makes sense.
How i can create nest views?
Thank you!
Currently, the blocks editor does not support nested views. It will in an upcoming release when we'll offer to create views independently as we can with the legacy editor.
So, you will need to insert the "nested/child" view inside the parent view using a shortcode:
[wpv-view name="name of the mensajes view"]
To enable the legacy editor, go to Toolset->Settings->General(tab)->Editing experience, and enable both editors.
Check the example on this page hidden link
- The first view is built with blocks within the page hidden link
It has a query filter on the post author. Check this screenshot hidden link
Notice how I added the second view using a shortcode inside the Fields&Text block. Check this screenshot hidden link
- The second view has been created using the legacy editor hidden link
It has a query filter on the relationship for the current post in the loop. Check this screenshot hidden link
Of course, you need to log in in order to see the results.
- Login using the demo user with the following link hidden link
- Login with another user using: john / john@toolset
I hope this answers your question. Otherwise, please elaborate more. At what point you are stuck on creating this nested view? Add screenshots when it makes sense.
Hi Jamal,
I have tried to do what you have told me but it has not been possible.
What have i done?
- I have created a view with block editor to inlcude, on field and text HTML mode, a shortcode with view name. i attach the settings of the view
- That view shortcode ([wpv-view name="mensaje-recibido"]) has the settings attached.
I created a 'Mensaje directo' page (hidden link) with this contact form: hidden link
But new page dont display on view who i created.
I need a filtered view of this custom types called 'Mensaje directo' so that the user who created the Enterprise page can see their received messages (pages which forms created).
I tried filter by author page = current author but that doesnt work because view tooks second author and not the original author (who created Enterprise).
Can you help me?
Thank you!