Knowledge Base - Form based canned replies

Freestyle Support now has a new system for using canned replies within the ticket system. It is based on a customizable form system, with template to generate the form.

You can configure the fields you want to be shown on the form and the template used for the reply. The canned replies can be used by both your users and ticket handlers to post replies into the ticket system (can be configured who can post them on a per reply basis).

To use the form based canned reply system you need to install Freestyle Support Portal v2.4 or above, and the Support Portal Additions package here. Once the additions package is installed, goto Components -> Freestyle Joomla -> Support Portal Additions -> Form Replies.

On this page, you need to install either/both the user and handler support portal plugins, and enable them. Each plugin has a few options to configure how and where the intergration happens in the support system.

Once the plugins are installed and enabled, you will need to set up your canned replies. Each canned reply has a customizable form that can be filled in before the reply is posted. Each form. Add a new item, and give your form a Name, and hit the save button. This will allow the addition of your fields.

Once your form is published, it will appear within the interface of support portal on your site. Depending on the options specified for the plugins, it can be either as a button when viewing a ticket, or within your canned replies.

Template output

The template that is used to generate the reply will be parsed and certain variables replaced. Any of your field entries that are configured will be replaced along with some other presets.

All fields on the form will replace {alias} in the template, so if you had a field called 'Gender', and its alias was 'gender', to output the value entered in the field in your tempalte you need to use '{gender}'.

Details of the templates logic systems, along with a full list of template replacements that can be used see here. Form Replies currently use template Type 1.

Complex tempate parsing

If you require more complex parsing within the template, you can enable the "Smarty" parsing system on the output by setting the "Parse Type" of the Form Reply to "Smarty" instead of "Internal Parser". All template replacements and fields will be passed to smarty as variables, so for a field with alias 'name', you could use '{$name|capitalize}' to output a version of the name with the first letter of each word capitalized. For full details on how to use smarty please see here.

Customizable forms

When displaying a form, you can specify the 'Tab' for each field. This is used to separate the different fields onto different tabs within the form. And example is shown below.

You can also dynamically show or hide elements on the form based on what has been previously entered. The screenshots below show different fields being displayed based on what is selected in the gender combo box.

Unfortunately, it would be far too complex to create a GUI for setting up dynamic forms (although we are working on how to do it!), you will need to create your own piece of javascript.

You will need to add a copy of line 6 'jQuery('#jform_data_form_gender').change(function () { updateForm(); });' for each element you wish to detect changes on. This will call the function updateFrom() to udpate what is displayed on the form. Within the updateForm() function, you will need to add some if statements based on what values are selected to show or hide the varying fields within the form. Some code is below that shows the example, and all field aliass have been highlighted.

// setup code for the form
jQuery(document).ready ( function () {
    updateForm ();
    // Need an entry here for each field that changes need detecting and processing on
    jQuery('#jform_data_form_gender').change(function () { updateForm(); });
// function called to update the form based on the current settings
function updateForm()
    if (jQuery('#jform_data_form_gender').val() == "Male")
    } else {

For further help with the scriping part of this, we can off custom form setup on your site for a small fee.

Applies To

Support Portal

Powered by Freestyle Support Portal