legacy-knowledge-base
公開されました Jun. 30, 2025

Is it feasible to hide fields in the upload Section of Document and Media?

投稿者

Kartik Singh

knowledge-article-header-disclaimer-how-to

knowledge-article-header-disclaimer

legacy-article

learn-legacy-article-disclaimer-text

Issue

  • Is there an OOTB feature to hide the following fields in the Document and Media Upload section?
    • Document Type
    • Display Page
    • Categorization
    • Expiration Date
    • Friendly URL
    • Related Assets
    • Permissions

Environment

  • Liferay DXP 7.4

Resolution

  • No, there is no OOTB feature available to hide these fields from the Document and Media Upload section.

NOTE: The following resolution requires customization and should only be implemented at the discretion of your team. Liferay Support will not be able to assist with designing or implementing customizations.

  • However, if hiding these fields is still required, kindly override the following JSP file to achieve this functionality. Below are the steps to do so: 
    • Steps:
      1. Start Liferay Developer Studio (LDS).
      2. Create a Liferay Workspace:
        • Navigate to File > New > Liferay Workspace Project.
        • Add the following line in gradle.properties, specifying your Liferay home path: iferay.workspace.home.dir=home/me/Liferay-7.4-U90/Liferay_Home
      3. Add the Liferay Server:
        • In LDS, locate the Server tab at the bottom left.
        • Click on the link that says "No Servers are available. Click this link to create a new server...".
        • Select Liferay, Inc. > Liferay 7.x, click Next, and in the "Liferay Portal Bundle Directory" field, specify your Liferay home path.
        • Click Finish to complete the setup.
      4. Create a Module Project Fragment:
        • Navigate to File > New > Liferay Module Project Fragment.
        • Enter a name for your project under "Project Name:" and click "Next".
        • Select com.liferay.document.library.web.jar in "Host OSGi bundle".
        • Select edit_file_entry.jsp in "Overridden files".
        • Click Finish.
      5. Customize the JSP File:
        • Navigate to the following location in your "module" project: src/main/resources > META-INF > resources > document_library > edit_file_entry.jsp.
        • Add a <div> tag with the style attribute set to display:none, wrapping the code for the fields you want to hide:<div style="display:none"> <!-- Code for the fields such as Document Type, Display Page, Categorization, etc. --> </div>
      6. Build and Deploy the Module:
        • Locate the Gradle Tasks tab in LDS.
        • Expand your Liferay workspace project, then go to Modules > [Your Fragment Project] > Build.
        • Run the clean task first, followed by the deploy task.
        • Once deployed, the specified fields will be hidden as expected. 

Additional Information 

      • The steps above are provided as a reference. Customization should be done according to specific business requirements.

      • A sample plugin is attached for reference.

      • For further concerns or queries, it is recommended to connect with the Global Services Team, as they provide development insights and address business-specific requirements. This team can be contacted through a sales representative.

did-this-article-resolve-your-issue

legacy-knowledge-base