webdevop
Forum Replies Created
-
Hello Jory ( @keraweb ),
I’m happy to announce that I found a solution:
function my_filter_pods_attendee_params($params) { if ($params['name'] == 'pods_meta_attendee') { $id = $params['pod']->id; $params['options']['_field_object']->pick_where = "(event.ID IS NULL OR event.ID='".$id."')"; } return $params; } add_filter('pods_field_pick_object_data_params', 'my_filter_pods_attendee_params', 1, 1);It was a bit of a nightmare to figure this out, but it works, so it can’t be completely wrong. 😉
This looks promising.
I’ll dig into it.Thanks for the pointers. 🙂
But … um … if you could describe how you would manually filter the SQL query.
Are there some hooks in the plugin code that I could use to design my own query maybe?
- This reply was modified 3 years, 8 months ago by webdevop. Reason: corrected typo
Hi Jory,
thanks for your reply.
It’s a pity.
I also already thought about making it a ManyToMany relationship.
But then I would have to make the attendee system wide unique and I could not store information on the attendee that differ from event to event.I will keep investigating. Maybe I can do some CSS tricks to hide the unwanted attendees.
Anyways, the PODS plugin is great. Looking forward to v3.0 🙂
Cheers