Copied to clipboard

Flag this post as spam?

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


  • Evgeny Savkhalov 3 posts 73 karma points
    Jun 08, 2018 @ 15:04
    Evgeny Savkhalov
    0

    Variable sub-properties of document type

    I have a document type (lets call it Article) and it has a property (lets call it Group) which is a dropdown list of 3 items. I need to have following functionality:

    When creating Article type content, user chooses a Group this Article belongs to. On the basis of this selection I need to show to user N additional fields to fill. For instance: if he chooses group A - there are fields Name, Address and Email to be filled. If he chooses group B - there are fields Company, Address and Website to be filled, etc.

    I need some ideas what is the best way to implement it

    Thank you in prior

  • Dan Diplo 1505 posts 5911 karma points MVP 4x c-trib
    Jun 08, 2018 @ 20:17
    Dan Diplo
    0

    The only way I can think is to create a custom property editor, as explained here - https://our.umbraco.org/documentation/Extending/Property-Editors/

  • Evgeny Savkhalov 3 posts 73 karma points
    Jun 08, 2018 @ 20:22
    Evgeny Savkhalov
    0

    It is a good advice. Obviously it will help me to resolve the issue. If you have any good links to tricks and tips of custom property editors - I will appreciate.

  • Nicholas Westby 2005 posts 6843 karma points c-trib
    Jun 08, 2018 @ 22:36
    Nicholas Westby
    0

    You could use Archetype or Nested Content to sort of achieve that.

    Rather than a drop down, your property would be of type "Archetype". You'd create three fieldsets (a fieldset is like a property that itself has a number of properties on it).

    • Fieldset A would have the properties belonging to Group A.
    • Fieldset B would have the properties belonging to Group B.
    • Fieldset C would have the properties belonging to Group C.

    You can configure it so the user can select nor more than one fieldset (e.g., so they can't add both Fieldset A and Fieldset B).

    Nested Content (now part of the Umbraco core) will give you a very similar experience to Archetype.

  • Evgeny Savkhalov 3 posts 73 karma points
    Jun 09, 2018 @ 00:21
    Evgeny Savkhalov
    0

    Thank you, I will play with this option. Looks like it is much easier, than previous advice (custom property), though, custom properties is also a necessary skill in Umbraco.

  • 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