Pop Up Form in Alfresco Share

Alfresco share, which provides collaborative platform on top of Alfresco, and can also be used as an interface for Alfresco repository. The main building block for Alfresco share is the form. There is a form-service in the back end which handles the form rendition. As Alfresco share heavily relies on forms during customization, we always come across requirements where we need to create many Alfresco share forms. As far as normal forms, we want to design it very easily but sometimes we need to show those forms in popups after clicking.

The main steps involved in creating popup forms are as follows:

Step 1:

Configure action config in share-config-custom.xml

<action id="document-customaction" type="javascript" icon="customicon"


      <!—param which indicate form needs to be open in popup   -->             

            <param name="function">onActionFormDialog</param>

     <!-- Additional parameters for onFormDialog function  -->

            <param name="itemKind">action</param>

            <param name="itemId">doc-tagging</param>

            <param name="mode">create</param>

            <param name="destination">{node.nodeRef}</param>

      <!--  params associated with the success and failure message of action   -->

            <param name="successMessage">message.customaction.success</param>

            <param name="failureMessage">message.customaction.failure</param>


Step 2:

Add messages in property file custom.properties

actions.document.customaction =Custom Action

actions.mycompany.goToGoogle=Google Search

message.customaction.success=Custom action executed successfully.

message.customaction.failure=Couldn't complete custom action.



Place it under <tomcat>/shared/classes/alfresco/messages

Step 3:

Register message related property file though custom-application-context.xml file


   <!-- Add application extension messages -->

   <bean id="mycompany.resources" class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">

      <property name="resourceBundles">







Place it under <tomcat>/shared/classes/alfresco/web-extension

Step 4:

Configure form in alfresco share which needs to be open in popup on click of action created in step1

&lt;config evaluator="string-compare" condition="<span style="color: #666666;">doc-tagging</span>"&gt;




                    &lt;show id="name"/&gt;

                    &lt;show id="address"/&gt;



                    &lt;field id="name" label-id="document-customaction.field.name"&gt;

&lt;field id="address" label-id="document-customaction.field.address"&gt;

                     &lt;control template="/org/alfresco/components/form/controls/textarea.ftl" /&gt;                   






Step 5:

Associate form created in step 2 with action created in step1

Form and actions are linked though action id i.e. document-customaction in this case. We just need to make sure form config has same condition attribute value as action id.

That’s it you are good to go restart your server. Login to alfresco share and click on your custom action you will be able to see popup with two fields called name and address.

Looking for quality Alfresco Web Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , , , , , , | Posted under Alfresco | RSS 2.0

Author Spotlight


I love opensource technologies working with those technologies from the time I have stepped in to the Software Industry. Alfresco CMS is my area of expertise. I have worked on various complex implementations which involved integration of Alfresco with other technologies, extensively worked with JBPM workflows and Webscripts.

7 Comments on Pop Up Form in Alfresco Share

  1. Clément says:

    Hi, I have a few questions.
    In the step 5 , how do I associate form created in step 2 with action created in step 1.
    And where do I click on the custom action ?
    Why condition=”doc-customaction” is different from id=”document-customaction” in your tuto since you said in step 5 “We just need to make sure form config has same condition attribute value as action id.” ?

    Thank you for your time


    • mitpatoliya says:

      Que: how do I associate form created in step 2 with action created in step 1?

      ANS: It will be associated through that form id only. I had edited post to match form id it was typo from my side sorry about it.

      Que:”where do I click on the custom action? “

      Ans : You can add created action in one of the action group and that will be visible along with other actions in same group. You can refer this article for more detail on custom actions.

  2. Clément says:

    thanks for your answer. My action is in the list, but now when I click on it, I have this exception in the console : org.alfresco.repo.forms.FormNotFoundException and the form is not displayed (error message in red) ?
    Do you know why ?

    • mitpatoliya says:

      I have edited post please check itemID parameter value and form matching condition both should match.

  3. izodev says:

    Nice tuto , but I still have a question:
    Can I get a String generated in my Java custom action code to be displayed it in the form as an initialization value for some field ?
    Thank you for your response

    • mitpatoliya says:

      But logically your action class will be called after form then how you will be able to show value set by action class? Am I missing something?

  4. Bob McDowell says:

    I have two questions about step 4.
    1. What is the name of the file this content goes in?
    2. Where, in my eclipse project, do I put that file?


Leave a Reply to Clément Cancel reply

Your email address will not be published. Required fields are marked *