I'm developing a composer block that has three properties:
1) Heading (PropertyString)
2) Template (PropertyDropDownList)
3) Content (PropertyXhtmlString)
I have two questions.
1) Is it possible to populate the Template field with an enum? I can see a potential problem in that a CMS administrator could add their own options into the field in Admin mode. That enum of course wouldn't be available in my code....???
2) Based on the users selectino from the Template DropDownList is it possible to show/hide certain field? So for example can I hide the Content input if the user selects a certain option fdrom the dropdownlist?
Thanks in advance
1 & 2: consider writing a custom property to suit your needs i.e. show/hide based on a dropdown selection.
1. You could make use of the DDS and property settings to add new types, or simply a delimited list, whichever you prefer.