Site Cloner PHP Script
Bargain Hunter PHP Script
Job Hunter PHP Script
Site Login and Access Control PHP Script

Joomla has a decent contact that form that comes with the CMS. But, you may want to upgrade one day as you may find the odd piece of junk email gets sent for which the user effortlessly fills it out with a couple of letters in each text box and sends it. The built in form can be upgraded with a plugin and component like tinCaptcha. The captcha ensures that the person is real. However, unless you have some competency in editing source files, you will find it difficult and time consuming to add new form fields. Therefore, wouldn’t it be great if you could just add custom forms with normal HTML/CSS, Javascript and PHP syntax? Well, that solution is very feasible with a plugin like sourcerer. Sourcer allows you to write Javascript, HTML/CSS and PHP just the way you want it. WordPress and Drupal have similar plugins and modules for writing similar code. Back to Joomla and Sourcerer. To make a custom form, you can create a new article and use whatever code you want to use between the sourcerer tags [source][/source]. Then, the form will be validated using the POST method using a content article with a specific id. The content article will use sourcerer tags to contain the php code which is used to validate the form. The code call the php file which validate the code may look like:
form action=”index.php?option=com_content&view=article&id=206&<?php echo date(‘l jS \of F Y h:i:s A’);?>” method=”POST”

However, if you made the form in an article using Sourcerer tags, the page would be cached. Therefore, if you would use this if page caching is ‘off’ or something very low like 1 minute. If the cache was set to 1 minute, only the first email in the next 60 seconds will be received and the next email after 60 seconds would be received.

Now, although this works fine, there in another rather simple option to use. That option is to make a custom module (they are not cached unless specified to do so). You can make a Joomla module here.

Now, you know how to use forms within Joomla reusing code from your repository. If you want to add Javascript, you can also do so in the article, if the Sourcerer plugin is set to accept Javascript in Articles (normally, it is by default). You can make sure the user fills out the form properly with error checking like “Please make sure your email address uses @” or “Please make sure your phone number is exactly 10 digits with or without hyphens”. Validation like this will almost certainly stop all people who get a kick out of annoying people with useless requests. Even if the person goes through the trouble at this point to send a bogus email, your simple deletion is 1/10 the time it would take to fill out the form properly. If the thank you message contained the user’s IP address that could help deter future harrassment. Finally, the contact page could always contain a little php to deny the ip addresses you don’t want to receive mail from and redirect them elsewhere.