cancel
Showing results for 
Search instead for 
Did you mean: 

custom edit document with view

welcometomylife
Champ in-the-making
Champ in-the-making
Hi everybody,

I'm looking for a way to customise my edit document form, so that I get the view of that document while I'm editing it, could someone get me te the wright way ?

thnx all.

version 4.2.e
windows
3 REPLIES 3

mitpatoliya
Star Collaborator
Star Collaborator
You need to add edit form entry in your share-config-custom.xml

   <form id="doclib-simple-metadata">
            <field-visibility>
               <show id="cm:name" />
                   …..
                   …..
                 put all the properties you want to show
             </field-visibility>
   </form>



above configuration.

slibert
Confirmed Champ
Confirmed Champ
Hello,

I tried to do so, but with no luck.
Adding a new field in share-config-custom is quite easy.
It's a little bit more difficult to add the document (cm:content). I tried to add "cm-content" (with some inspiration from original forms-config.xml), but I'm only able to get a content textbox (same as you get with inline-edit). Not what you want if you need to see the PDF next to the properties.
I made some searches also in Form Designer, but with no result.

Has anybody a working config sample for displaying document when editing metadata ?

Regards

kaynezhang
World-Class Innovator
World-Class Innovator
If the mimetype of your d:content is text you can configure content/richtext controls to render your field,for example

               <field id="cm:content">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl" />
               </field>
or
               <field id="cm:content">
                  <control template="/org/alfresco/components/form/controls/content.ftl" />
               </field>

If mimetype is not text ,you should add customizing controls to render it,for example embed pdf-renderer in your customizing control to render pdf.