• 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: Multiple attachments from checkboxes possible?

Multiple attachments from checkboxes possible? 11 years 5 months ago #25559

Is it possible to add multiple attachments (i.e. pdf) to a User email, based on which checkboxes they selected on the form?
The administrator has disabled public write access.

Multiple attachments from checkboxes possible? 11 years 5 months ago #25565

  • m.andrei
  • m.andrei's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 17
  • Thank you received: 1
There is no default feature that will allow you to actually attach multiple files to a generated RSForm!Pro email. As an alternate solution(a more simpler way), you can consider adding the direct download URL of your PDF files as the checkbox items and by using the | pipeline symbol you can have a cleaner look in your form:

mysite.com/path/to/first.pdf|First PDF
mysite.com/path/to/second.pdf|Second PDF
....and so on

In the frontend, the checkbox items will only show the right part of the item. An explanation on the pipeline usage can be found here:

www.rsjoomla.com/support/documentation/v...-checkbox-group.html

The next thing would be to use the checkbox's placeholders(which will return the checkbox selections) within the RSForm!Pro generated emails:

www.rsjoomla.com/support/documentation/v...onfigure-emails.html

If you really need to attach these PDF files, due to RSForm!Pro flexible nature this can be implemented via specialized scripting areas (PHP Email scripts), you can try using something like:

$userEmail[] = JPATH_SITE.'/path/file.pdf';

More information about these scripting area can be found in the following article:

www.rsjoomla.com/support/documentation/v...p-email-scripts.html

The "Getting Started" section explains RSForm!Pro in a more detailed way:

www.rsjoomla.com/support/documentation/v...getting-started.html
Last Edit: 11 years 5 months ago by alexp.
The administrator has disabled public write access.

Multiple attachments from checkboxes possible? 10 years 9 months ago #28070

I had the same issue below is the coding that finally worked for me. I had to change the Check boxes to Radio buttons for this to work properly. This coding was placed in the " php email scripts - $userEmail section."

if ( $_POST [form] [ radio name here ] == 'Yes')
$userEmail[] = JPATH_SITE.'/Path/File';

and repeat: make sure to put the ' before and after 'form' and 'radio name here'. The coding was getting hidden when i tried to add them in the reply.
Last Edit: 10 years 9 months ago by mducreative.
The administrator has disabled public write access.

Multiple attachments from checkboxes possible? 6 years 5 days ago #39068

I'm searching an issue in the same way : multiple attachments, but thru php email script.

If I select only one file, it's working. But multiple files doesn't.

I think the solution could be in writing the right files separator.

Somebody know it and can help me ?

here is my code :
$id = $_GET['s'];
$db = JFactory::getDbo();
$db->setQuery("SELECT pic FROM #__a_cid WHERE cid = '".$id.''");
$pics=$db->loadObjectList();
foreach($pics as $pic) {
	$listpics.=JPATH_SITE."/images/".$pic->pic." ";
}
$userEmail[files] = $listpics;
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!