AnsweredAssumed Answered

Per-form default-controls doesn't work in 3.4.d

Question asked by d_garry on Jun 24, 2011
Latest reply on Aug 2, 2011 by mccarthymp
Hello everybody!
I have a problem with defining default-controls in Alfresco Share forms.
In this manual (http://docs.alfresco.com/3.4/index.jsp?topic=%2Fcom.alfresco.Enterprise_3_4_0.doc%2Fconcepts%2Fkb-share-forms.html) there is an example:
<config evaluator="node-type" condition="cm:content">
   <forms>
      <default-controls>
         <type name="text"
               template="/org/alfresco/components/form/controls/textfield.ftl" />
      </default-controls>
      <form>
<!– cut cut cut cut cut cut cut cut –>

I want to use it this way:

<config evaluator="node-type" condition="my:ownWorkflowTaskType">
   <forms>
      <default-controls>
         <type name="text"
               template="/org/alfresco/components/form/controls/info.ftl" />
      </default-controls>
      <form>
   </forms>
</config>
But in Alfresco Share (Community 3.4.d) this example just doesn't work, system ignores <default-controls> tag when it's in <config evaluator="node-type" condition="my:ownWorkflowTaskType"> block.When i put it in common <config> block, like this:
<config>
   <forms>
      <default-controls>
         <type name="text"
               template="/org/alfresco/components/form/controls/info.ftl" />
      </default-controls>
      <form>
   </forms>
</config>
,
it works. But in this case i cannot define per-form default controls, as <config> block affects all my forms. Example: i have two workflow forms; one form is for input, the second one is informational. They contain many text fields, and i want to make them not-editable only in second form using info.ftl instead of default textfield.ftl, without writing many many "read-only = true" definitons.
Do you have any ideas?
Regard,
Igor.

Outcomes