Copied to clipboard

Flag this post as spam?

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


  • dev-thandabantu 41 posts 321 karma points
    Nov 16, 2022 @ 06:36
    dev-thandabantu
    0

    Filter Umbraco Form dropdown list programmatically

    I have an Umbraco form. I would like to filter my dropdown list to exclude certain options depending on the logged in user. I know how to perform the filtering. But I don't know how to access the dropdown list so I can perform the filtering. Some of the answers I have seen here are a bit too abstract for me to understand and I am looking for an answer beginner-friendly steps on how to go about this. FYI: Editor

  • dev-thandabantu 41 posts 321 karma points
    Nov 16, 2022 @ 10:08
    dev-thandabantu
    0

    I am clearly lost on how to go about doing this. I just spent the past two hours following this documentation: Adding a field type to Umbraco Forms. Yes I have learnt a lot (good for me) but the end result isn't what I am trying to achieve.

    Following the documentation got me this: End result

    As I said above, what I actually want is to be able to filter a dropdown list on an existing Umbraco form (not create a new answer type or new editor, etc).

    So, if anyone has an idea, please help me.

  • dev-thandabantu 41 posts 321 karma points
    Nov 16, 2022 @ 15:14
    dev-thandabantu
    0

    So I have had more time to play around, read and think some more. And I am starting to question if it is possible to achieve what I want. Here is my thought process:

    • The dropdown list is part of the Document Type that my registration document/page is using
    • But it is actually deeper than that.
    • Because on the Document Type the form is inserted as a complete Form Component with the dropdown list already in place.
    • In other words, the dropdown list is not coming from the Document and neither is it coming from the Document Type.
    • Which left me asking if the Content Service and ContentType Service are any useful for my needs.
    • I am not sure yet, but my suspicion is that they are both incapable of getting the dropdown list.
    • Leaving these two services aside, how else can I access the dropdown list?
    • Is it possible to access it or that's beyond the capability of Umbraco Forms extending?

    This is where I am now.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies