GrossiWeb brought our company online a little over 2 years ago and the results have been nothing less than tremendous! Their professional designs, keen insight, and ongoing support have vaulted our company to the forefront of our highly competitive market with significant revenue increases and broader exposure. GrossiWeb has exceeded our expectations on every level and made our business stronger and more secure. Always available and easy to work with, I highly recommend GrossiWeb for any business, large or small, looking to expand their online horizons and exposure. -- Tyson Rhame :: Sterling Currency Group, President

Website Marketing

Adding Referring URLs to RS Form


1. Back up the site files of the site you are working on.

2. Login to the backend of the site(www.domain.com/administrator) mouse-over Extensions -> click on Template Manager and check to see which template is in use as default (you don't need to do/change anything, you just need to know which template files you will be working with)


3. Go to Filezilla (or your preferred FTP tool) and connect to the relevant site. Browse out to the Templates folder, go into the directory structure of your active template and download the index.php.


4. When you have the file downloaded, open it up in dreamweaver (or notepad) and search for the closing head tag  - </head>

- Add this piece of code above it (as per below image):

//$document->setGenerator('Atlanta Web Design, Search Engine Optimization, and Internet Marketing Company | Grossiweb.com');

if ($_SESSION['source']=="") {

if($_SERVER['HTTP_REFERER']) { // referred from another web page


} //else {

//$_SESSION['source'] = "http://www.grossiweb.com/" ;// typed yourdomain.com directly into browser






5. Save the file and upload it to the same directory - templates/{template name}



1. Go to filezilla again, and go up to the root directory - Go to the components->com_rsform->controller directory and download the functions.php file to your hard drive (please note there are two files functions.php and functions.js - DO NOT TOUCH THE functions.js FILE)


2. When you have the functions.php file downloaded, open it up in dreamweaver and search for //mail admins


4. Replace the code that was within //mail admins and the closing } tag above functionRSgetSubmissionValue ($SubmissionId, $ComponentId) with this code:

//mail admins

$recipients = explode(',',$adminEmail['to']);


foreach($recipients as $recipient)


$adminEmail['text']=$adminEmail['text']."<p>Refering Url: ".$_SESSION['source']."</p><p>test: ".$_SERVER['HTTP_REFERER']."</p><p>IP: ".$_SERVER['REMOTE_ADDR']."</p>";

//$adminEmail['text']=$adminEmail['text']."<p>Refering Url: ".$_SESSION['source']."</p>";


$adminEmail['text'] .="<p>Refer ID: ".$_GET['referid']."</p>";

$RSadapter->mail($adminEmail['from'], $adminEmail['fromName'], $recipient, $adminEmail['subject'], $adminEmail['text'], $adminEmail['mode'], !empty($adminEmail['cc']) ? $adminEmail['cc'] : null, !empty($adminEmail['bcc']) ? $adminEmail['bcc'] : null, $adminEmail['files'], !empty($adminEmail['replyto']) ? $adminEmail['replyto'] : '');


$thankYouMessage = RSprocessField($r['Thankyou'],$SubmissionId);


// SESSION quick hack - we base64 encode it here and decode it when we show it

$_SESSION['form'][$formId]['thankYouMessage'] = base64_encode($thankYouMessage);

$_SESSION['form'][$formId]['submissionId'] = $SubmissionId;




return false;



5. Save the file, upload the file back to where it was (/public_html/components/com_rsform/controller) and test the form to see if it works. Please also go to backend and click on RS Form Component under Components -> RSForms PRo and ensure that everything is working correctly.

ALWAYS BACKUP THE SITE FIRST BEFORE YOU START - So we can revert back if accidents happen (and they do happen)