Customise PDF attachment

  • oliver.mcnamee
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 12
  • Thank you received: 0

oliver.mcnamee created the topic: Customise PDF attachment

Hi,

Does anyone know of a way to customise contents of a PDF attachment created from a form entry? There is a lot of superfluous information in relation to IP address, browser, Operating system.

It would be good to know if there is a way similar to the HTML formatting that could be applied to the PDF attachment.

Just want to the details that were entered in the form to be sent as a PDF.

TIA
#237563
  • Posts: 2553
  • Karma: 87
  • Thank you received: 343

mihaela replied the topic: Customise PDF attachment

Hello,

Here crosstec.org/en/support/online-documenta...-s-pdf-template.html it is explained how to change the template of the PDF attachment that is sent along with the confirmation email (if this option is enabled).

As for the info like IP address, browser, Operating system, you can easily remove it by commenting out or deleting this code in the template:
<tr>
		<td colspan="2" bgcolor="#cccccc" align="left" valign="middle">
			<h2><?php echo $this->submitted; ?></h2>
		</td>
	</tr>
	<tr>
		<td>
			<strong><?php echo BFText::_('COM_BREEZINGFORMS_ID') ?>:</strong>
		</td>
		<td>
			<?php echo $this->form; ?>
		</td>
	</tr>
	<tr>
		<td>
			<strong><?php echo BFText::_('COM_BREEZINGFORMS_PROCESS_SUBMITTEDAT') ?>:</strong>
		</td>
		<td>
			<?php echo $this->submitted; ?>
		</td>
	</tr>
	<tr>
		<td>
			<strong><?php echo BFText::_('COM_BREEZINGFORMS_IP') ?>:</strong>
		</td>
		<td>
			<?php echo $this->ip; ?>
		</td>
	</tr>
	<tr>
		<td>
			<strong><?php echo BFText::_('COM_BREEZINGFORMS_BROWSER') ?>:</strong>
		</td>
		<td>
			<?php echo htmlentities($this->browser, ENT_QUOTES, 'UTF-8');  ?>
		</td>
	</tr>
	<tr>
		<td>
			<strong><?php echo BFText::_('COM_BREEZINGFORMS_PROCESS_OPSYS') ?>:</strong>
		</td>
		<td>
			<?php echo htmlentities($this->opsys, ENT_QUOTES, 'UTF-8');  ?>
		</td>
	</tr>
	<tr>
		<td colspan="2" bgcolor="#cccccc">
			<strong><?php echo BFText::_('COM_BREEZINGFORMS_DATA') ?>:</strong>
		</td>
	</tr>

Let me know whether you have managed to make it work as you wanted.

Regards,

Mihaela
#237566
  • oliver.mcnamee
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 12
  • Thank you received: 0

oliver.mcnamee replied the topic: Customise PDF attachment

Thanks Mihaela, That does work. The PDF attachment now shows just name and email.

In order to produce the PDF attachment in the format of a "form", I assume would need to incorporate some PHP code into the formname__.php file?

I currently have the form configured to be emailed and formatted with html and it looks ok. I'm working on converting manual forms to electronic. The PDF needs to reflect the form with the field names etc and user inputs.

Time to learn some PHP I think!

Thanks again.
#237569
  • Posts: 2553
  • Karma: 87
  • Thank you received: 343

mihaela replied the topic: Customise PDF attachment

Hi again,

I'm glad that you have managed to remove the unnecessary information from the PDF.

As for the other part, you are right, in order to produce the PDF attachment in the format of a "form", you have to write a custom PHP template and save it as formname__.php file.

I hope that you will manage to do so.

Regards,

Mihaela
#237579
Moderators: ForumSupporttomeperica
Time to create page: 0.069 seconds

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

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!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here