TOPIC:

how add an uploaded client photo in de export of the records as PDF ? 3 weeks 4 days ago #243039

  • Topic Author
  • ASPadventure
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 23
  • Thanks: 0
Hi,

We have two questions that are correlated:

1) We are building a subscription form to a game. The subscriber has to upload a photo.
If I look at the received record I see the image. But when we try exporting the records as a PDF, only the path to the image on the server is shown (as text).
The screening committee has no access to our website, so it is necessary that we add the image in the PDF export?
2) How do we add a page end after every single record in the PDF file?

Thank you in advance!

Hedy

Please Log in or Create an account to join the conversation.

how add an uploaded client photo in de export of the records as PDF ? 3 weeks 3 days ago #243044

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 300
  • Karma: 3
  • Thanks: 46
Hi,

you want to display an image that the user has uploaded? Then you need to slightly modify the export pdf. I will write you code to show the picture.
Locate: joomla root\media\breezingforms\pdftlp\export.pdf
and add something like this:
....
<?php
$fields=array();
$fields['upload'] = array();
$subs = $this->getSubrecords($rec->id);
$subsSize = count($subs);
for($s = 0; $s < $subsSize; $s++) {
	$sub = $subs[$s];
	switch($sub->name) {
	   case 'upload':
		$fields['upload']['title'] = htmlentities($sub->title, ENT_QUOTES, 'UTF-8');
		$fields['upload']['value'] = nl2br(htmlentities(substr($sub->value,0,10000), ENT_QUOTES, 'UTF-8'));
	   break;		  
	}	
?>
<tr>
<td>
	<strong><?php echo htmlentities($sub->title, ENT_QUOTES, 'UTF-8'); ?>:</strong> 
</td>
<td>
	<?php echo nl2br(htmlentities(substr($sub->value,0,10000), ENT_QUOTES, 'UTF-8')); ?> 
</td>
</tr>
<?php
}
?>
<tr>
<td>
</td>
<td>
<img src="<?php echo $fields['upload']['value'];?>" width="150">
</td>
</tr>
<?php
}
?>
</table>

Let me know if you need additional help.

Regards,
Tihana

Please Log in or Create an account to join the conversation.

how add an uploaded client photo in de export of the records as PDF ? 3 weeks 3 days ago #243048

  • Topic Author
  • ASPadventure
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 23
  • Thanks: 0
Hi Tihana, thank you for your quick reply.
I was trying there, but where do I but it? Instead of the original code or between it?
Hedy

Please Log in or Create an account to join the conversation.

how add an uploaded client photo in de export of the records as PDF ? 3 weeks 3 days ago #243049

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 300
  • Karma: 3
  • Thanks: 46
Hi,

beetween code.
Example:
<?php
/**
* BreezingForms - A Joomla Forms Application
* @version 1.8
* @package BreezingForms
* @copyright (C) 2008-2012 by Markus Bopp
* @license Released under the terms of the GNU General Public License
**/
defined('_JEXEC') or die('Direct Access to this location is not allowed.');
// IMPORTANT!
// Supported Tags: h1, h2, h3, h4, h5, h6, b, u, i, a, img, p, br, strong, em, font, blockquote, li, ul, ol, hr, td, th, tr, table, sup, sub, small
?>
<table border="1" width="100%">
<?php
$recsSize = count($recs);
for($r = 0; $r < $recsSize; $r++) {
	$rec = $recs[$r];
?>
<tr>
<td colspan="2" bgcolor="#cccccc" align="left" valign="middle">
	<h2><?php echo $rec->submitted; ?>, <?php echo $rec->id; ?></h2>
</td>
</tr>
<tr>
<td>
	<strong><?php echo BFText::_('COM_BREEZINGFORMS_ID') ?>:</strong>
</td>
<td>
	<?php echo $rec->id; ?> 
</td>
</tr>
<tr>
<td>
	<strong><?php echo BFText::_('COM_BREEZINGFORMS_PROCESS_SUBMITTEDAT') ?>:</strong>
</td>
<td>
	<?php echo $rec->submitted; ?> 
</td>
</tr>
<tr>
<td>
	<strong><?php echo BFText::_('COM_BREEZINGFORMS_IP') ?>:</strong>
</td>
<td>
	<?php echo $rec->ip; ?> 
</td>
</tr>
<tr>
<td>
	<strong><?php echo BFText::_('COM_BREEZINGFORMS_PROCESS_SUBMITTERUSERNAME') ?>:</strong>
</td>
<td>
	<?php echo htmlentities($rec->username, ENT_QUOTES, 'UTF-8');  ?> 
</td>
</tr>
<tr>
<td>
	<strong><?php echo BFText::_('COM_BREEZINGFORMS_PROCESS_SUBMITTERFULLNAME') ?>:</strong>
</td>
<td>
	<?php echo htmlentities($rec->user_full_name, ENT_QUOTES, 'UTF-8'); ?> 
</td>
</tr>
<tr>
<td>
	<strong><?php echo BFText::_('COM_BREEZINGFORMS_PROCESS_SUBMITTERID') ?>:</strong>
</td>
<td>
	<?php echo $rec->user_id; ?> 
</td>
</tr>
<tr>
<td>
	<strong><?php echo BFText::_('COM_BREEZINGFORMS_BROWSER') ?>:</strong>
</td>
<td>
	<?php echo htmlentities($rec->browser, ENT_QUOTES, 'UTF-8');  ?> 
</td>
</tr>
<tr>
<td>
	<strong><?php echo BFText::_('COM_BREEZINGFORMS_PROCESS_OPSYS') ?>:</strong>
</td>
<td>
	<?php echo htmlentities($rec->opsys, ENT_QUOTES, 'UTF-8');  ?> 
</td>
</tr>
<tr>
<td>
	<strong><?php echo BFText::_('COM_BREEZINGFORMS_PAYMENT_TRANSACTION_ID') ?>:</strong>
</td>
<td>
	<?php echo $rec->paypal_tx_id; ?> 
</td>
</tr>
<tr>
<td>
	<strong><?php echo BFText::_('COM_BREEZINGFORMS_PAYMENT_TRANSACTION_DATE') ?>:</strong>
</td>
<td>
	<?php echo $rec->paypal_payment_date; ?> 
</td>
</tr>
<tr>
<td>
	<strong><?php echo BFText::_('COM_BREEZINGFORMS_PAYMENT_TESTACCOUNT') ?>:</strong>
</td>
<td>
	<?php echo $rec->paypal_testaccount == 1 ? BFText::_('COM_BREEZINGFORMS_YES') : BFText::_('COM_BREEZINGFORMS_NO'); ?>
</td>
</tr>
<tr>
<td>
	<strong><?php echo BFText::_('COM_BREEZINGFORMS_PAYMENT_DOWNLOAD_TRIES') ?>:</strong>
</td>
<td>
	<?php echo $rec->paypal_download_tries; ?> 
</td>
</tr>
<tr>
<td colspan="2" bgcolor="#cccccc">
	<strong><?php echo BFText::_('COM_BREEZINGFORMS_DATA') ?>:</strong>
</td>
</tr>
<?php
$fields=array();
$fields['upload'] = array();
$subs = $this->getSubrecords($rec->id);
$subsSize = count($subs);
for($s = 0; $s < $subsSize; $s++) {
	$sub = $subs[$s];
	switch($sub->name) {
	   case 'upload':
		$fields['upload']['title'] = htmlentities($sub->title, ENT_QUOTES, 'UTF-8');
		$fields['upload']['value'] = nl2br(htmlentities(substr($sub->value,0,10000), ENT_QUOTES, 'UTF-8'));
	   break;		  
	}	
?>
<tr>
<td>
	<strong><?php echo htmlentities($sub->title, ENT_QUOTES, 'UTF-8'); ?>:</strong> 
</td>
<td>
	<?php echo nl2br(htmlentities(substr($sub->value,0,10000), ENT_QUOTES, 'UTF-8')); ?> 
</td>
</tr>
<?php
}
?>
<tr>
<td>
</td>
<td>
<img src="<?php echo $fields['upload']['value'];?>" width="150">
</td>
</tr>
 
<?php
}
?>
</table>
adjust it to your form.
This is just my example.
I hope that helps to you.

Regards,
Tihana

Please Log in or Create an account to join the conversation.

how add an uploaded client photo in de export of the records as PDF ? 3 weeks 3 days ago #243051

  • Topic Author
  • ASPadventure
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 23
  • Thanks: 0
Nope, still doesn't show.... I try later this morning again. Have an appointment in a few minutes...
Thanks for now!

Regards, Hedy

Please Log in or Create an account to join the conversation.

how add an uploaded client photo in de export of the records as PDF ? 3 weeks 3 days ago #243054

  • Topic Author
  • ASPadventure
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 23
  • Thanks: 0
I doesn't work....
Could you please help me inset the code into the file?

Thx Hedy

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Moderators: ForumSupport
Time to create page: 0.050 seconds

Summer Sale!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!