Introduction

Content Plugin - Visforms Daten

Note: These features are part of the Visforms Subscription and are not included in the free Visforms version.

New application areas for forms require more flexibility in the presentation of data

Visforms offers you the possibility to save the entries that the users of your website submit with the form. This stored data can be displayed on your website using a menu.

Visforms has continuously developed over time in terms of its range of functions and its flexibility. There are now many areas of application in which Visforms forms can be used. Depending on the area of application of the form, other ways of displaying form data are now required.

It is particularly interesting:

  • View submitted data in articles or modules.
  • Show only records where one or more user inputs have a specific value.
  • Limit the number of records shown, e.g. only show the 5 most recent records.
  • Show only own records of the currently logged-in user.

What are plugins and how do they work?

Joomla supports the use of so-called plugins. These are smaller programs that intervene in the code at various points and can carry out any special tasks there. “Disguising” an email address in a text so that it can no longer be found by spambots is a typical task performed by a plugin. Another plugin task is to regulate the switching between the languages on multilingual websites.

Content plugins can subsequently change the content of articles and modules of the “Custom HTML” type

Modules of the “Custom HTML” type are the same for displaying content in a module location as articles are for displaying content in the content area of the web page. You can enter any custom HTML content into the module as free text and display it in a module position. It would really be too long-winded to always refer explicitly to articles and modules of the “Custom HTML” type in this documentation.

Note: Therefore, articles and modules of the "Own HTML" type are summarized below under the handy collective term "articles".
So what is said here always also applies to the module.

There are different types of plugins and one type of them are so-called “content plugins”. “Content Plugins” can subsequently change the content of articles.

This can be used to do the following in an article:

  • Search for a defined string, called the plugin string.
  • Cut out the found plugin string from the article.
  • Insert something completely different at the place where it was found.

An example of this is the plugin string {loadposition bottom}. All active modules with the module position “bottom” are displayed at the exact position where this plugin string is located.

As a developer, you can define how the plugin string should look in the article. Therefore, it is very easy to pack additional information into the plugin string. Any parameters can be passed to the plugin via the plugin string. The plugin code evaluates the parameters and is controlled in this way.

Our Visforms plugins of type “Content Plugins” use this plugin string replacement technique. This makes it possible, for example, to display a form or the form data in an article and at the same time control the appearance of the form or the data.

An advantage of using plugins in conjunction with a plugin string is that you can pass all the necessary information in a very simple and handy way. The specific design of the plugin string means that control parameters are passed directly to the plugin. It is flexibly controlled how the insert should look for this exact position. Also, pasting a short plugin string into an article is really easy and takes little work.

A small disadvantage is that the user must know exactly what the plugin string should look like. Because if the plugin string you insert isn’t constructed exactly as the plugin code expects, then the plugin won’t work at that point. You must understand the concept and read the documentation carefully. This is the only way you can find out exactly what the plugin string has to look like so that the plugin does what you want it to do.

What does that mean specifically?

To give you a better understanding of this concept, here are a few examples of what a plugin string can look like and what it does. The examples use the data from our demo sports event entry form, which has form ID 7.

Example 1: Complete entry list

The following plugin string is replaced with the tabular data from fields with ID 89, 90, 91, 92 and 93 from form with ID 7. Separate pagination is displayed for the records, showing 5 records per page.

{vfdataview}{"formid":"7","fieldlist":"89,90,91,92,93","display_num":"5"}{/vfdataview}

Example 2: Latest message

The following plugin string only displays the data of the most recent record from the form with ID 7. It is displayed as a detailed list with only the relevant data that is in the fields with ID 89, 90, 91, 92 and 93.

{vfdataview}{"formid":"7","count":"1","sortorder":"created","sortdirection":"desc","layout":"list","fieldlist":"89,90,91,92,93"}{/vfdataview}
First name
Carl
Last Name
Clausen
Year
2000
Sex
Male
Running Distance
10 kilometers

Example 3: Participants in the 10-kilometer run

The following plugin string will only show records of female participants who chose to run 10 kilometers. These are data records that have the value “w” in the field with ID 92 and the value “10 kilometers” in the field with ID 93. First name and last name are displayed, which are in the two fields with ID 89 and ID 90.

{vfdataview}{"formid":"7","fieldselect":{"92":"w","93":"10 kilometers"},"fieldlist":"89,90"}{/vfdataview}

Large number of different parameters

The Content Plugin - Visforms Data evaluates a large number different parameters, with which almost any representation of form data can be realized. A full list of parameters can be found here: List of Plugin Parameters.