cancel
Showing results for 
Search instead for 
Did you mean: 

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

d_garry
Champ in-the-making
Champ in-the-making
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-sh...) 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="mySmiley SurprisedwnWorkflowTaskType"> 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.
1 REPLY 1

mccarthymp
Confirmed Champ
Confirmed Champ
Have you tried setting each field's controller using the appearance tag for each property that you want to change?
           <appearance>
               <field id="my:prop">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
            </appearance>
It is probably more markup but should do the job.