FAQs

How do I show a form in a module?

Written

The ChronoForms module allows you to show your forms in a template module location - typically one of the boxes at the sides or the top or bottom of the page.

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

Once the module is installed you can manage it from the Extensions | Module Manager page. If necessary put 'chrono' in the File Name box to find the ChronoForms module. Open the module, set the title and Position and add the Form name that you want to display in the Form Name box ( {rokbox text=|click to see image|}http://www.chronoengine.com/images/stories/tutorials/module%20set%20name.png{/rokbox} ).

In Joomla! 3 you have to Click the Options tab to enter the form name

If you need more form modules then click 'New' in the toolbar and select a module of type 'ChronoForm'.

Showing a Thank you message

There is a possible problem when you have a form in a module set to show on all pages. After the form is submitted the Thank you page shows the message twice - once in the page and once in the module location. You can hide the module in this case by checking the page url with code like this in a Custom Code action in the form On Load event.

<?php
$url = \JFactory::getURI();
// if this is a submit url then hide the form
$query = $url->getQuery(true);
if ( $query['event'] == 'submit' ) {
  $jdoc = \JFactory::getDocument();
  $style = "
  .jsn-modulecontent #chronoform-form_name {
    display: none;
  }
  .jsn-modulecontent dd.validation {
    display: none;
  }
  .gbs3 .chrono_credits {
    display: none;
  }
  ";
  $jdoc->addStyleDeclaration($style);
  return;
}
?> 

Notes:

This example is for ChronoForms v5.

Please check your template to see exactly what CSS to apply - you may need to change .jsn-modulecontent; and

The highlighted form_name should be replaced by the name of your form.