Legacy Knowledge Base
Published Jul. 2, 2025

Form embedded in web content template is disabled, not working

Written By

Sorin Pop

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

1. Create a new Form: Add 3 text fields: Firstname, Lastname, Email. 1 'Select From List' field for Nationality (e.g Indian, Saudi Citizen), and an Upload field named Upload CV.
2. Create a Web Content Structure having 2 Text fields named "Title" and "Subtitle" and an HTML field.
3. Create a Web Content Template attached to the Structure you created:
Put code to read 2 fields from the Structure and to embed Liferay Forms:
${Title.getData()}
${SubTitle.getData()}

<@liferay_portlet["runtime"]
      portletName="com_liferay_dynamic_data_mapping_form_web_portlet_DDMFormPortlet"    
      defaultPreferences="${freeMarkerPortletPreferences}"

/>
<#assign VOID = freeMarkerPortletPreferences.reset() />

4. Create one Web Content Article using the Structure. Add title, and some html text.
5. Drag and drop created Web Content Article into a page. 
6. Select the created Form

Expected Results: Form can be filled out and Submitted
Actual Results: Form is disabled as well as its Submit button.

Environment

  • DXP 7.1

Resolution

  • The issue happens because of the Web Content Template's cache. Fortunately, this feature can be turned off on the UI, that ensures that the form is updated on every request: 
    1. Edit your Web Content Template
    2. Expand the Details section on the Edit page
    3. Uncheck the "Cacheable" checkbox
    4. Save your Web Content Template
    5. (Optional) In case the Form is still disabled for you, please also update the related Web Content Article

 

 

Did this article resolve your issue ?

Legacy Knowledge Base