Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Philip Yao 1 post 71 karma points
    Jul 12, 2016 @ 04:19
    Philip Yao
    0

    DialogService.MemberPicker Filter

    Hi Everyone,

    I hope somebody can help me with this. I am currently working on a Custom Section on my Umbraco Site and then I have a property in my custom object "Account" a property named "Supervisor". In which it points to a member.

    My problem now is that when the dialogService opens it shows all member Types. Is there a possibility to be able to filter or to set the dialog for the member picker to only allow "Supervisor" member type?

    Any help will be much appreciated.

    Thanks, Philip

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jul 12, 2016 @ 05:11
    Jan Skovgaard
    0

    Hi Phillip and welcome to the Umbraco developer forum :)

    I'm not sure whether or not it's possible to add a filter property to the options object since it's not mentioned in the documentation but I had a scenario where I used the contentPicker method and needed to do some filtering and I tried adding filter:'myDocType' to the options object, which turned out to work.

    So perhaps you can try seeing if this works with the memberPicker too?

    Another approach might be to filter the returned members afterwards using the memberTypeResource perhaps? I don't know what the resource contains or does since the documentation page is currently blank - https://our.umbraco.org/apidocs/ui/#/api/umbraco.resources.memberTypeResource - But perhaps it contains some methods that might be useful to you?

    Hope these pointers can help.

    Looking forward to hearing from you.

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft