on this page here hidden link
there is a field called guns choice , this field will always be matched to 1st,2nd,3rd or 4th etc .
when im entering my fields here hidden link
and scroll down to event dogs , connect existing dog , if i have already entered a dog for 1st place , then when i select guns choise i cannot select the dog if it was already placed in 1st .
i hope that makes sense
Hi Martin,
Thanks for asking! I'd be happy to help.
I understand that the "Events" and the "Dogs" post types have a many-to-many post-relationship. As you noted, it is not possible to link the same objects twice in a single relationship.
For example, if a dog "A" has been connected once in a relationship with an event "X", the connection between these two cannot be repeated, within the scope of the same post-relationship.
You can continue using this post-relationship to store information about the regular standings ( e.g. 1st,2nd,3rd or 4th etc ). But for the assignment of the guns choice title/award, you can create a new post reference field with the "Event" post type that can show the list of available "Dogs" post type items:
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/using-post-reference-fields-to-display-information-from-a-related-post/
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
thank you waqas,
also i have a custom field for events named _EventOrganizerID how would i get that info from within a view?
i tried [wpv-post-title field="_EventOrganizerID" item="@events-dog.parent"] bit that get me the title of the event ?
like here hidden link (under breeder you see what this line if fetching)
thanks waqas
Hi Martin,
Thanks for writing back.
The "wpv-post-title" shortcode ( ref: https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-title ) can only be used to get the post title.
To get the value from a custom field, you can use the "wpv-post-field" shortcode:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-field
For example, to get the value of the field with slug "_EventOrganizerID":
[wpv-post-field name="_EventOrganizerID" item="@events-dog.parent"]
To get the title from this organizer's ID, you can use:
[wpv-post-title item='[wpv-post-field name="_EventOrganizerID" item="@events-dog.parent"]']
And for a title with a link:
[wpv-post-link item='[wpv-post-field name="_EventOrganizerID" item="@events-dog.parent"]']
regards,
Waqar
brilliant thanks waqas both those are now sorted!! im getting there !!
i have 1 last issue i cant seem to resolve and its annoying me , once i have this sorted i can start entering my data finally!!
this page here hidden link shows judges , i can get this field to display no problem hidden link
but none of these hidden link
the 1st is a field in the event judge relationship and the 2nd is the fields attached to post type judges.
i basically want to attach the fields from the judge post type to the judges names here hidden link
obviously the judges showing here are related to that event this is one is quite time sensitive as im sat ready to start inputting a whole lot of data!!
Hi Martin,
Glad that your website is almost ready and to show custom fields data from the "judge" posts, in the view "judge on events" ( hidden link ), you don't need a separate view like "judge fields".
( hidden link )
You can simply use item='@events-judge.child' attribute in the in view "judge on events", like this:
panel for judge: [types field='panel-for-judge' item='@events-judge.child'][/types]<br>
judge book number: [types field='judge-book-number' item='@events-judge.child'][/types]<br>
judge image: [types field='judge-image' item='@events-judge.child'][/types]<br>
I hope this helps and you're welcome to open a new ticket for each new question or concern.
regards,
Waqar
it did indeed help all sorted!! i have found a flaw though waqas , when on a judges page like this one
hidden link
it only shows the jusge whos page your on and doesnt display the other judges related to the event , i want it too work the other way , ie shows the other judges but doesnt repeat the judge whos page your on
Hi Martin,
Thanks for the update and glad that the single events page is sorted out now.
Since your new question is not related to the current thread's discussion, I'll reply it through a separate ticket, shortly.
https://toolset.com/forums/topic/split-how-to-show-judges-related-to-an-event/
You're welcome to mark this ticket as resolved.
regards,
Waqar