Visforms, Caching and the Message "Sorry, you can send the form only once"
Visforms prevents users from accidentally submitting a form more than once. To achieve this, the code sets a flag, when a form is displayed using Visforms code. When a user tries to submit the form, the code checks if the flag is set. If the flag is not set, Visforms returns with the error message "Sorry, you can send the form only once". Otherwise the form is submitted and the flag is removed.
In some cases the error message is display although it looks as if the form was submitted correctly for the first time and only once. One reason for this problem can be configuration settings of the Joomla! cache which are not compatible with Visforms.
Caching doesn't suit forms at all, therefore the Visforms code tries to prevent Joomla! from caching the forms. Nevertheless it is possible to set up the Joomla! cache in a way, that the Visforms code is overriddden.
Two different Joomla! Caches
Joomla! offers different ways to set up a cache.
The System Plugin Cache
First there is the System Plugin Cache. This plugin, when activated, creates a cache of each whole page. If the page is displayed a second time Joomla! will display the cached document without touching Visforms code any more. Therefore Joomla! will not even notice that Visforms doesn't allow to cache the forms. Furthermore, the flag mentioned above, which should be set, when the page is displayed, is not set and if a user submits the form, this will result in the error message mentioned above.
Please disable the System Plugin Cache, when you use Visforms on your website and you use a Visforms version lower than Visforms 3.6.6
The System Configuration Cache
Second there are cache settings in the System Global Configuration. This caching works fine, even if the System Plugin Cache is disabled. While Joomla! default components are cached, an extension, like Visforms, that prohibits Joomla! from caching through its code, is not cached.
Using the Joomla! Conservative Caching (set in System Global Configuration) is compatible with Visforms, except when you use forms inside an article.
Caching of articles with forms
If you display a form inside an article (using a module of type Visforms and the Joomla! Plugin Loadposition or our native content plugin vfformview), the article will be cached if you enable Joomla! cache in the System Global Configuration. In this case you have to take further actions. You can either us a Joomla! Extension like the plugin CacheControl which enables you to deactivate the caching of specific pages or your cannot use Joomla! caching at all.
Other reason why you recieve the Message "Sorry, you can send the form only once"
If you have created a menu item of type Visforms on your Joomla! installation and uninstall Visforms from your Website, the menu item will remain but will be set to a sort of "disabled" status. You can find a notice in the menu list view "component doesn't exist". Nevertheless the menu item is still visible in the front end of your website. If you install Visforms again and create a new form which happens to have the same form id as the form linked to the previously created menu item, the form will be displayed properly but you recieve the "Sorry, you can send the form only once" message when you submit the form. To fix the problem, go to the menu item, open it and save it. That's it.
New in Visforms 3.6.6
In Visforms 3.6.6 we have improved the compatiblity of Visforms with Joomla! Cache setting, especially when you us the Visforms module. Basically caching is suppressed now as much as Joomla! allows you to prevent caching of a module and thus the form is not cached and works properly when displayed in a Visforms module.
With Visforms 3.6.6 or higher it is possible to use Visforms on websites with the system cache plugin enabled.
This will work, if you display a form via menu item or in a module. You can enable caching in global configuration and set it to "conservative caching", too.
It is not possible to use the progressive caching setting with Visforms because this setting is actually not supposed to be used with forms at all.
If you want to learn more about the different caching options and their impact on module caching, I found this page very informative: http://www.inmotionhosting.com/support/edu/joomla-25/caching/global-module-caching.
If you want to display a form in an article (using the Visforms content plugin vfformview or using the loadposition method of Joomla!) in combination with cache enabled you still have to use a thirdparty extension which allows you to turn of the cache for individual page(s)
In this case I recommend the above mentioned CacheControl Plugin, which is very much straigt foreward, easy to use and effective: Plugin CacheControl.
If you use the Visforms content plugin vfformview in a module of type custom HTML then it suffices to set the cache control for this module to "no caching" (Tab "Advanced").