PROBLEM
Getting the Simple Email Form module to work inside an article with a CAPTCHA with Joomla Cache enabled.
SOLUTION
Use JotCache or CacheControl.
DISCUSSION
Hello Doug, I'm back !
I tested simpleemailform in a module with jotCache : no problem. jotCache asked me a few problems should be understood that all Joomla
cache system should be completely disabled... I used simpleemailform in a module then I disabled jotCache in the position used by the module.
Then I used simpleemailform in an article, and surprise, jotCache is turned off unexpectedly without further adjustment. Everything works
perfectly.
I also added a text field above and another below the form: it is convenient for a module used alone in a standard position of the template.
Have a good day...
Thanks to MicHELP! (who can be contacted at: info at michelp.fr)
- Using your tutorial about using simple email form in a within an article - look it up in joomla documentation, to speed this up I've attached this link here: http://docs.joomla.org/How_do_you_put_a_module_inside_an_article%3F
- Make sure the simpleemailform has "no caching" setup within the module
- Set up a menu link with the single article type - when you've saved it, go back to it to extract the menu link id number, e.g. index.php?option=com_content&view=article&id=100, we'll only need the "option..." information from here.
- I scrapped jotcache and used cachecontrol, here's the link to get it: http://extensions.joomla.org/extensions/core-enhancements/performance/cache/17783.
- Installed cachecontrol and insert "option=com_content&view=article&id=100" that I've mentioned above.
- Make sure whilst you're in the Plugin Manager having sorted out cachecontrol, that the system-cache is switched off BUT leave it switched on in joomla global configuration.
- Also not sure if this makes a difference but I had my mail settings (in global configuration in the server tab) using the "sendmail" function, e.g.
- From email: insert your email you wish to use for the website to use.
- From name: insert a name you would like to be called as, e.g. Website Webmaster
- Sendmail path: /usr/sbin/sendmail
- Now test your new simpleemailform at the frontend and give it a run!
- As a bonus I've set up the redirect url with a thank you page article by doing the same method of inserting a module in an article with loadposition and the menu id inserted in the redirect url:
- The following I've used sourcer which allows javascript coding and jce editor (it allows javascript - you have to ensure it is switched on in the jce configuration)
- Just copy below everything from "{source ..... {/source}" into your module and save it.
- {source}
<script type="text/javascript">
var counter = 10;
setInterval(function() {
counter--;
if(counter < 0) {
window.location = 'index.php';
} else {
document.getElementById("count").innerHTML = counter;
}
}, 1000);
</script>
<div class="alert alert-success">
<button type="button" class="close" data-dismiss="alert">×</button>
<h4>Great!</h4>
<br><br>Thank you for your email - you will get a reply back in the next few days.<br><br>
Will be in touch!
<div id="count"></div>
<p>Watch me redirect to another page in 10 seconds...</p>
<div class="progress">
<divclass="bar"style="width:60%;"></div>
</div>
</div>
{/source} - The above allows to thank the person sending the email, gives a time delay and redirects to the home page