• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Auto-filling deferred email

Auto-filling deferred email 10 years 7 months ago #29006

I found out that RSform will not auto-fill an e-mail which has been set to send only after payment has completed through the RSForm payment system. I'm using the following code:

$modAdminEmailText = $form->AdminEmailText;
foreach($_POST['form'] as $component=>$value){
  if(is_array($value)) $value = implode(',',$value);
    if($value != ''){
    $modAdminEmailText .= '{'.$component.':caption}: {'.$component.':value}'."<br/><br />";
    }
 
  if($component == 'comment') {
   break;
  }
}
$adminEmail['text'] = $modAdminEmailText;
$adminEmail['text'] = str_replace($placeholders, $values, $adminEmail['text']);

This displays all my fields when the email is sent in the normal flow (on form submit), but it doesn't show anything when setting the email to be deferred (sent on completion of payment).

Is there anything to be done about this, or should I accept it as a limitation of the system?
The administrator has disabled public write access.

Auto-filling deferred email 10 years 7 months ago #29009

  • alexp
  • alexp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 2253
  • Thank you received: 180
Your script is not correct. You are assuming that the overall submission information is within the $_POST variable. This is true only when the form is being submitted, not when using "defer".

In such case, you need to extract the submission information directly from the database. $submissionId variable should allow you to do this.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

Auto-filling deferred email 10 years 7 months ago #29011

Alright, makes sense now that I think about it :)

Thanks, should get it working now.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!