The fm:Form_ChannelTree component generates a selectbox, populated with channels from channels in a tree indented format from your project.

This can be used for example to specify a channel in an upload form, or a list of channels and their indented children to pick when creating a gallery.


<fm:Form_ChannelTree name="channel"/>

Supported attributes

classOptionalThe css classname that will be assigned to the actual html form field. Note that a few default classes might be added
disabledOptionalN/AThis will set the html disabled attribute
hideParentOptionalfalseWhen displaying the Channel Tree, this will no include the Parent channel in the drop down.
idOptionalrandomizedThe id of the form element. Note that this id will also be used for the 'for' attribute in the <label> component
labelOptionalN/AThis attribute will be used to generate labels for this component, if it's used within an fm:Form component
languageOptionalN/AThis specifies which language to use for the display of the form_country dropdown. Choices are:
  • en - English
  • es - Spanish
  • fr - French
  • nl - Dutch
multipleOptionalN/ASetting multiple will allow the user to select multiple items in this dropdown.
nameRequiredN/AThe name of the form field. This is how the value will be submitted back to the server
parentIdOptional0The id of the parent channel that you want to show the child tree of in the drop down, Defaults to 0, and shows all channels.
readonlyOptionalN/AThis sets the html readonly attribute and controls if the user can change the value
requiredOptional0Set required to '1' if you'd like the form validator to check if this form element has a value before submitting
sizeOptionalN/AThe size attribute will be directly passed through to this component and dictates how much items are showing by default.
styleOptionalThe style attribute for the actual form component
titleOptionalN/ASets the title attribute on the select element.
truncateAtOptional16Truncate text at this length,
valueOptionalThe current value of the form element
visibilityOptionalALLShow only channels with the specified visbility setting. SHOWN/HIDDEN/ALL,

See also

More examples

You can still add custom options, just like with the standard fm:Form_Select component. These options will end up on the top of the list.

<fm:Form_ChannelTree name="channel"> <fm:Form_Option value="" label="All channels" /> </fm:Form_ChannelTree>