ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Channel Form - Show only entries authored by user in Relationship selection

December 11, 2013 2:59am

Subscribe [1]
  • #1 / Dec 11, 2013 2:59am

    miketwalker86

    2 posts

    I am trying to use the new Grid fieldtype to allow users to build a list that is used somewhere else combining multiple entries. The Grid feature seems to offer the best option to me since I can just plug a Relationship field into it (and allow people to order the entries).

    I am currently doing a form like this (or in the cp):
    {exp:channel:form channel="playlists" include_jquery="no"}
    {field:playlist}
    {/exp:channel:form}

    In the {field:playlist} is a relationship which renders awesome (great job on the UI for resorting and add/removal, EllisLab!) but unfortunately shows every entry in a given channel. The options for relationship allow you to choose entries in a channel by either all users or a specific user. I want to have it show entries by the user currently logged in.

    For example, User A has entries 1, 2, and 3 in the “files” channel and User B has entries 4 and 5. If I select User A to filter things it will show 1, 2, and 3 in the field (regardless if User A or B is logged in). If I do all users it shows 1, 2, 3, 4, and 5 entries. Ideally, User A would see 1, 2, and 3 with User B seeing 4 and 5 as options.

    Any tricks for how to do this? It looks like I could generate my own sortable select list UI with something funky like playlist[rows][new_row_2][col_id_1][data][] for the name tag, but that kinda defeats the purpose of using Grid and requires a whole remake of the UI for add/delete/sorting. There seems like there must be a more elegant way to do this that I’m not seeing in my testing or searches. Thanks for your help!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases