My site has events. members can apply for an event. I want to prevent them applying more than one time for an event to prevent duplicates.

My set up is as follows:

  • channel event

  • 2 channels for accreditation (internal and external) with the same field group attached, one of these fields is a playa field with the events. My registered visitors apply to these events with a safecracker form.

So in my template i want to see if the current user has allready made an entry in the accreditation channels by using the playa:parent_ids tag. However, this is not returning anything.

{exp:playa:parent_ids channel="external_accreditation|accreditation" show_expired="true" show_future_entries="true" status="Open|Pending|Accepted" field="acc_rel_event"}

I have playa links installed on my system, and that addon does return the proper parents: enter image description here

Or am i trying to do this in an overly complex way?

Here's my complete test template, where the child stuff is outputting, only the parent stuff is not:

{if logged_out}{redirect=''}{/if}
            entry_id: {entry_id} - channel short name: {channel_short_name} url_title: {url_title}<br>
            total parents: 
            {exp:playa:total_parents channel="external_accreditation|accreditation" show_expired="true" show_future_entries="true" status="Open|Pending|Accepted"}<br>
            {exp:playa:parent_ids channel="external_accreditation|accreditation" show_expired="true" show_future_entries="true" status="Open|Pending|Accepted"}<br>
            {exp:playa:child_ids channel="external_accreditation|accreditation" status="Open|Pending|Accepted"}<br>
            {exp:playa:parents channel="external_accreditation|accreditation" status="Open|Pending|Accepted" var_prefix="acc"}

  • Is the exp:playa:parents inside or outside of a exp:channel:entries loop? If it's outside, I believe you need to supply an entry_id.
    – Siebird
    Aug 11 '14 at 17:45
  • it's inside. and the debug shows it takes the correct entry id Aug 12 '14 at 7:26
  • Are your statuses’ short names actually Open, Pending, and Accepted (with the capital letters)? Pretty sure that it’s case-sensitive. Aug 12 '14 at 17:37
  • yes they are correct... Aug 12 '14 at 19:29
  • any ideas what could be the case? Aug 14 '14 at 14:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.