Troubleshooting Form Rendering Issues with Joomla Cache

When embedding a form with the {convertforms ID} shortcode, you may run into problems if Joomla's Conservative or Progressive cache options are enabled. This is especially noticeable when forms include dynamic content, such as Smart Tags populated from query strings or PHP.

Why This Happens

Joomla's cache stores the entire page after the form has been rendered. This means the HTML output of the form is cached along with the article or component that contains it. As a result, if your form depends on dynamic data, you may see outdated or incorrect values.

Suppose you have a field that uses the {querystring.name} Smart Tag:

  1. Visiting: www.site.com/form?name=John, the field correctly shows John.
  2. Visiting in another browser or tab: www.site.com/form?name=Maria, the field still shows John, because Joomla served the cached version of the page.

And it’s not limited to Joomla articles; it may occur in any component where the form is rendered.

Fix: Skip Rendering During onContentPrepare

If rendering the form via the shortcode inside an article is a requirement, add the skipPrepareContentRender option to your shortcode:

{convertforms ID --skipPrepareContentRender}

This tells Convert Forms not to render during the onContentPrepare event (which Joomla caches), but instead during a later event that runs after the cache has been processed.

This method works with both Conservative and Progressive Cache. It is the recommended approach if you need to embed forms in articles and maintain dynamic content such as Smart Tags or PHP-generated values.

Alternative Workarounds

If you prefer not to use the shortcode with the skip property, there are other ways to publish the form that avoid cache issues.

1. Publish the Form with the Convert Forms Menu Item

If you can dedicate a page to your form instead of embedding it in an article, publishing it via the Convert Forms Menu Item is a good solution. This method does not use Joomla cache by default, so dynamic fields will always display correctly. It works with both Conservative and Progressive Cache.

The main drawback is that it offers less flexibility than embedding the form directly inside an article. For full instructions on publishing a form with a menu, visit: Displaing Forms via the Form Menu Type.

2. Publish the Form with the Convert Forms Module

Another option is to publish the form through the Convert Forms Module and set its Caching option to No Caching. This ensures that the form is always rendered fresh, and dynamic data is displayed correctly. 

However, this method only works with Conservative Cache and will not solve issues when Progressive Cache is used. Additionally, it requires managing module placement rather than simply embedding the form with a shortcode. For full instructions on publishing a form via a module, visit: Displaying Forms via a Module.

Last updated on Aug 28th 2025 13:08