Reputation: 85
I am still fairly new to Alfresco and thought I was trying to do something common, but I can't figure out how to do it. My basic question: is there a simple (built-in) way of hiding or showing one field based on the value of another?
Details:
I would like to be able to do something like this in my share-config.xml file:
<field id="a:thisField" label="This Field Label">
<control template="/org/alfresco/components/form/controls/hide.ftl">
<control-param name="property">a:myCheckboxField</control-param>
</control>
</field>
This would show or hide the entire 'thisField' whenever a checkbox was checked or unchecked. Of course, there is no 'hide.ftl'! From what I have read, I gather I could write something like that to do what I want, but isn't this really so basic that it should be supported somehow? [Besides, I don't haven't had to do anything like that yet, so it would be all new.] If there is an easy way, I couldn't find it and would be grateful for any help!
Upvotes: 1
Views: 626
Reputation: 6159
There is no special support to act on one field depending on the value of another.
I guess the easiest thing to do would be to come up with a custom two-in-one.ftl
housing both fields.
Upvotes: 1