Search code examples
alfrescoalfresco-sharealfresco-webscripts

Alfresco. How to show the form field by condition?


Good afternoon. There is a business process with many tasks. In one of the tasks there are two association fields (for simplicity, let's call their field 1 and field 2). As when opening this task, check the value in field 1 and, depending on its value, hide or show field 2?


Solution

  • You can copy the OOTB free marker (.ftl) file for your control. e.g. selectone.ftl located at

    alfresco-home\tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\form\controls

    then add JavaScript code to it to show/hide your fields.