• 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: Only attach generated PDF if checkbox checked

Only attach generated PDF if checkbox checked 10 years 5 months ago #29627

  • mike.r.hermary
  • mike.r.hermary's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 1
Hello,

I am using the PDF plugin in RSForm! Pro on Joomla 2.5 and I am wondering how a conditional could be setup to only generate a PDF and attach it to the user email if a checkbox is checked. The testing form can been reviewed here medicineriverwildlifecentre.ca/index.php...com_rsform&formId=22.

I have tried using this code in the $userEmail PHP Email Scripts area, but it does not work:

$modUserEmailText = $form->UserEmailText;
 
if($_POST['form']['GiftRecipient'] != '')
  $modUserEmailText .= '{user_pdf}';
 
$userEmail['text'] = $modUserEmailText;
$userEmail['text'] = str_replace($placeholders, $values, $userEmail['text']);

I want to check if the "Gift Recipient" checkbox is checked and if it is, attach the generated PDF to the user email. I understand my user PDF placeholder is for the link, but there is no documentation stating what the generated user PDF is.

Any assistance is greatly appreciated. Thank you.

Mike
The administrator has disabled public write access.

Only attach generated PDF if checkbox checked 10 years 4 months ago #29678

  • mike.r.hermary
  • mike.r.hermary's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 1
Hello,

Here is the bit of code that is needed to check if a checkbox is checked and attach the generated PDF:

if(!isset($_POST['form']['checkbox-field-name']))
  $info->useremail_send = 0;

I hope it is helpful to anyone looking to implement this functionality.
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!