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
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.
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.
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.
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
The only way I can think is to create a custom property editor, as explained here - https://our.umbraco.org/documentation/Extending/Property-Editors/
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.
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).
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.
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.
is working on a reply...