AnsweredAssumed Answered

removing fields from form

Question asked by hajmon on Nov 19, 2014
Latest reply on Nov 27, 2014 by sanket
hello
im using alfresco community 5.0.b
and im developing custom model
with
<parent>cm:content</parent>
and forms do add and edit object based on that model

model(hajmon:Multimedia) works fine(i think so) but I cant get rid off
fields like name, locale, content, creator and modifier from form in which im creating new object.
I modified alfresco\tomcat\shared\classes\alfresco\web-extension\share-config-custom.xml like below but it is not working


<config evaluator="string-compare" condition="DocumentLibrary">

<types>
         <type name="cm:content">
          <subtype name="hajmon:Multimadia" />
         </type>
         <type name="cm:folder">
         </type>

         <type name="trx:transferTarget">
            <subtype name="trx:fileTransferTarget" />
         </type>

      </types>



<config  evaluator="node-type" condition="cm:content" >
      <forms>
          <form>
               <field-visibility>
               <hide id="cm:creator"/>
               <hide id="cm:name"/>
               <hide id="cm:title"/>
               <hide id="cm:name"/>
               <hide id="cm:description"/>
               <hide id="cm:author"/>
               <hide id="cm:creator"/>
               <hide id="cm:created"/>
               <hide id="cm:modifier"/>
               <hide id="cm:modified"/>
            </field-visibility>
            <appearance>
     </appearance>
           </form>   
           <form id="doclib-simple-metadata">
              <field-visibility>                 
               <hide id="cm:creator"/>
               <hide id="cm:name"/>
               <hide id="cm:title"/>
               <hide id="cm:name"/>
               <hide id="cm:description"/>
               <hide id="cm:author"/>
               <hide id="cm:creator"/>
               <hide id="cm:created"/>
               <hide id="cm:modifier"/>
               <hide id="cm:modified"/>
               </field-visibility>
            
               <edit-form template="../documentlibrary/forms/doclib-simple-metadata.ftl" />
            <appearance>
            </appearance>   
            </form>

            <form id="doclib-inline-edit">
               <field-visibility>              
               <hide id="cm:creator"/>
               <hide id="cm:name"/>
               <hide id="cm:title"/>
               <hide id="cm:name"/>
               <hide id="cm:description"/>
               <hide id="cm:author"/>
               <hide id="cm:creator"/>
               <hide id="cm:created"/>
               <hide id="cm:modifier"/>
               <hide id="cm:modified"/>
               </field-visibility>
      <appearance>
     </appearance>
            </form>
         </forms>    
   </config>


<config evaluator="node-type" condition="hajmon:Multimadia">
      <forms>
         <form>
        <field-visibility>
               <show id="hajmon:Tytul" />
               <show id="hajmon:Typ_nagrania"/>
               <hide id="hajmon:Rodzaj_medium"/>
               <show id="hajmon:Nosnik" />
               <show id="hajmon:Jakosc" />
               <show id="hajmon:Data_rejestracji" />
               <show id="hajmon:Czas" />
            </field-visibility>
      <appearance>
     </appearance>
         
         </form>

         <!– Document Library pop-up Edit Metadata form –>
         <form id="doclib-simple-metadata">
         
        <field-visibility>
              <show id="hajmon:Tytul" />
             <show id="hajmon:Typ_nagrania"/>
               <hide id="hajmon:Rodzaj_medium"/>
               <show id="hajmon:Nosnik" />
               <show id="hajmon:Jakosc" />
               <show id="hajmon:Data_rejestracji" />
               <show id="hajmon:Czas" />         
            </field-visibility>
         
            <edit-form template="../documentlibrary/forms/doclib-simple-metadata.ftl" />
         
           <appearance>
     </appearance>
         
         </form>
      
         <form id="doclib-inline-edit">
         <field-visibility>
               <show id="hajmon:Tytul" />
              <show id="hajmon:Typ_nagrania"/>
               <hide id="hajmon:Rodzaj_medium"/>
               <show id="hajmon:Nosnik" />
               <show id="hajmon:Jakosc" />
               <show id="hajmon:Data_rejestracji" />
               <show id="hajmon:Czas" />
            <hide id="cm:locale"/>   
            </field-visibility>
          <appearance>
     </appearance>
        
         
         </form>
      </forms>
   </config>




thanks in advance for any suggestions, im pretty new in Alfresco.
best regards

Outcomes