Buy Now
Sign in

FAQ search

How do I show a form in an article?

Details
Published: Thursday, 21 November 2013 10:14

The ChronoForms plug-in allows you to display a form in a Joomla! article.

Do you really need to show the form in an article?

If the form is the main part of the page content then it may be simpler to add any additional text into the form using Formatted Text or Custom Element elements. You can then link the form URL to a Menu item and the form will display on your site in a similar way to an article. The main reason for using the plug-in is if you want to embed a small form into several different articles. 

Using the plugin

You need to download and install the correct version of the ChronoForms plug-in from the Downloads area here.

Please double-check that you have the correct version as this has caused problems.

Once the plug-in is installed please enable it from the Extensions | Plug-in Manager page.

ChronoForms v4

In your article add {chronoforms}form_name{/chronoforms} with the name of your form between the tags where you want the form to appear.

ChronoForms v5

In your article add the same code but replacing chronoforms with chronoforms5

Check the article source HTML

Please click the HTML button in your article editor and check that the tags are *not* inside <p> tags like this:

<p> . . . {chronoforms}form_name{/chronoforms} . . . </p>

If you find this please remove the <p> tags or replace them with <div> tags. Technically <form> tags are not allowed inside <p> tags and some browsers, like IE, enforce this.

Check too that no 'stray' HTML has been included that breaks the tag code like this example:

{chrono</strong><strong>forms}</strong><strong>form_name{/chronoforms}

The tag code must be clean and unbroken or it will not be found when the page loads and the form code is added

Passing parameters

In CFv5 only you can also add parameters in the plug-in code like this

{chronoforms5}my_form_name&param_name=value{/chronforms5}

Please check the source code if you are using an editor to make sure that the value has not been changed by the editor. Plain text strings should be OK.

Note: the ChronoForms v4 plugin does not support data parameters.

Problems with form submission

Using the plug-in can sometimes cause problems with form submission. Usually this is because ChronoForms tries to use the page URL as the basis for the form action. If SEF is turned on for the site this can give odd results. Please try setting Relative URL to No.

  • In CFv4 this setting is on the form General Tab (click the form name link in the Forms Manager to see it);
  • In CFv5 it is in the HTML (render form) action settings;
  • In CFv6 add {url:} in the Display Section > Action URL box

Using LoadPosition

it is possible to use the LoadPosition Plug-in to load a ChronoForm from an module location into an article. This may work but is not recommended, use the ChronoForms plug-in instead. With LoadPosition we have seen reports of the form not submitting, or submitting several times so that more than one copy of the email is sent out.