Basic instructions are here:
www.rsjoomla.com/support/documentation/r...on-confirmation.html
In order to achieve what I need, the following modifications have to be made:
1) Create custom link and add to admin e-mail
Enable the "Enable Confirmation By Email" option in form properties.
Add a registration code element (or support ticket placeholder, the name seems to have changed).
Add the custom link to the admin e-mail body, replace form id and registrationcode with your own form id and whatever you named the registration code element:
UrlOfYourWebsite.com/index.php?option=com_rsform&formId=12&subId={global:submissionid}&hash={
YourRegistrationCodeName:value}
2) Add php to "Scripts called on form Display"
replace the registration code name with your own:
//replace the Registration Code name with the one you've given:
$RegCodeVariable = "YourRegistrationCodeName";
//getting parameter values:
$app = JFactory::getApplication();
$sid = $app->input->getInt('subId');
$hash = $app->input->getVar('hash');
//checking if parameters are available:
if(!empty($sid) && !empty($hash)){
$db = JFactory::getDBO();
$db->setQuery("SELECT `FieldValue` FROM #__rsform_submission_values WHERE `FieldName`='".$RegCodeVariable."' AND `SubmissionId` = '".$sid."'");
//checking if the hash matched the submission ID:
if(!empty($db->loadResult())){
//This confirms the submission:
$db->setQuery("UPDATE `#__rsform_submissions` SET `confirmed` = 1 WHERE `SubmissionId` = '".$sid."'");
$db->execute();
//Confirmation message shown after clicking the custom link:
$formLayout = "<p>Add your own message here.</p>";
//the following triggers your form's emails:
RSFormProHelper::sendSubmissionEmails($sid);
}
}
3) Add php e-mail scripts
This prevents the user- and admin e-mails from being sent but will trigger the additional e-mails.
Script called before the User Email is sent:
if(!isset($_POST['form'])){
$userEmail['to'] = '';
}
Script called before the Admin Email is sent:
if(!isset($_POST['form'])){
$adminEmail['to'] = '';
}
Script called before the Additional Email are sent:
if(isset($_POST['form'])){
$additionalEmail['to'] = '';
}
4) Add the additional e-mails
These are the confirmation mails, which are sent after the submission has been confirmed.
In my case one is sent to user and one to admin.