cancel
Showing results for 
Search instead for 
Did you mean: 

Hiding form field via TaskListener script

dmitrii_zolotov
Champ in-the-making
Champ in-the-making
Hello

I need to hide some form fields (displayed with Share) in particular conditions when the flow usertask arrived. I've tried to define "create" script in Activiti Workflow (via TaskListener), but haven't success in modification of fields visibility (via Forms SDK).

Thanks in advance for any help!
1 REPLY 1

afaust
Legendary Innovator
Legendary Innovator
Hello,

the most reliable way to hide a field from a workflow model in the Share form UI is by removing its definition in a <a href="http://wiki.alfresco.com/wiki/Forms_Developer_Guide#Form_Filter">form filter</a>. A form filter is Java-based implementation that can modify many aspects of a form before it is displayed and when its data is saved / processed. If you remove the field definition of a particular field in the afterGenerate method, Share won't know about the field and not display it unless you've forced it or explicitly configured a control template.

Regards
Axel