Vorformatiere Formulardaten als PDF Ausgäben?

  • sakari
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 38
  • Thank you received: 0

sakari created the topic: Vorformatiere Formulardaten als PDF Ausgäben?

Hallo Freunde,
ich habe eine Frage zum Thema „Admin E-Mails“ und „Rückantwort Emails“!
Ich habe alle Formulardaten schön platziert und formatiert wie ich es haben wollte!
Nun kommen beide Benachrichtigungen im HTML Code als Email!
Meine Frage jetzt!
Wie bekomme ich diese Benachrichtigungen als PDF, die auch genauso aussehen sollen wie beim HTML Mail!
Unter den Einstellungen habe ich unter Email Benachrichtigungen Anhang PDF eingestellt!
Es kommt auch eine PDF, aber die sieht nicht so aus wie ich sie hätte!
Warum wird das nicht genauso ausgegeben und wo kann es man so einrichten?
Kann mir jemand, da weiterhelfen?
Ich bedanke mich schon mal im Voraus für eure Hilfe! :)

Viele Grüße
Sakari
#223912
  • Posts: 2222
  • Karma: 44
  • Thank you received: 279

marko.bosnjak replied the topic: Vorformatiere Formulardaten als PDF Ausgäben?

Hello Sakari,

you'll have to change the PDF template. Please check out these topics:
crosstec.org/en/support/online-documenta...-s-pdf-template.html
crosstec.org/en/forums/3-breezingforms-f...template.html#164036

Let me know if you have more questions.

Regards,
Marko

======================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
======================================
Need to renew Pro Support?
Buy Here!
======================================
Satisfied?
Consider a Membership!
======================================
Follow us on Facebook!
#223988
  • sakari
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 38
  • Thank you received: 0

sakari replied the topic: Vorformatiere Formulardaten als PDF Ausgäben?

Hello Marko,
I also had tried this manual, but I do not understand how I can get my data in?
No matter what I change in the code, I do not get the data in the PDF!

I would like to this data in the PDF!
{Name:label}
{Name:value}

{Vorname:label}
{Vorname:value}

{Geburtsdatum:label}
{Geburtsdatum:value}

{Strasse:label}
{Strasse:value}

{PLZOrt:label}
{PLZOrt:value}

{TelefonPrivat:label}
{TelefonPrivat:value}

{TelefonMobil:label}
{TelefonMobil:value}

{EMail:label}
{EMail:value}

Can you please help me with the code, what should it look like?
Thank you in advance for your help.

Best regards :)
Sakari
#224038
  • Posts: 2222
  • Karma: 44
  • Thank you received: 279

marko.bosnjak replied the topic: Vorformatiere Formulardaten als PDF Ausgäben?

Hey Sakari,

I made you an example. Find the form and PDF template attached.
I'll explain the process step by step.

1) The form is name "TestForm". That is important, because the template must be named in the following pattern FORMNAME_pdf_attachment.php. In my case, it's TestForm_pdf_attachment.php. Save the file in the /media/breezingforms/pdftpl/ folder.

2) The form has eight elements named "Name", "Vorname", "Geburtsdatum", "Strasse", "PLZort", "TelefonPrivat", "TelefonMobil" and "EMail". That is also important, because names of form's elements must match the names in the PDF template file.

3) I deleted all the default lines. I guess you don't need them. The file has the following code:
<?php
$Name = '';
$Vorname = '';
$Geburtsdatum = '';
$Strasse = '';
$PLZort = '';
$TelefonPrivat = '';
$TelefonMobil = '';
$EMail = '';
  
if (count($xmldata)){ 
   foreach ($xmldata as $data) {
      $value = nl2br(htmlentities(substr(is_array($data[_FF_DATA_VALUE]) ? implode('|',$data[_FF_DATA_VALUE]) : $data[_FF_DATA_VALUE],0,10000), ENT_QUOTES, 'UTF-8'));
      switch($data[_FF_DATA_NAME]){
        case 'Name':
          $Name = $value;
          break;
		case 'Vorname':
          $Vorname = $value;
          break;
		case 'Geburtsdatum':
          $Geburtsdatum = $value;
          break;
		case 'Strasse':
          $Strasse = $value;
          break;
		case 'PLZort':
          $PLZort = $value;
          break;
		case 'TelefonPrivat':
          $TelefonPrivat = $value;
          break;
        case 'TelefonMobil':
          $TelefonMobil = $value;
          break;
		case 'EMail':
          $EMail = $value;
          break;
      }
    }
}
?>
<strong>Name: </strong><?php echo $Name; ?><br/> 
<strong>Vorname: </strong><?php echo $Vorname; ?><br/>
<strong>Geburtsdatum: </strong> <?php echo $Geburtsdatum; ?><br/>
<strong>Strasse: </strong> <?php echo $Strasse; ?><br/>
<strong>PLZort: </strong><?php echo $PLZort; ?><br/>
<strong>TelefonPrivat: </strong><?php echo $TelefonPrivat; ?><br/>
<strong>TelefonMobil: </strong><?php echo $TelefonMobil; ?><br/>
<strong>EMail: </strong><?php echo $EMail; ?><br/>
First I defined all variables that the template will take from the form. They are initially empty. Then come the IF and FOREACH statement that will take each value from the form and using the SWITCH-CASE statement, each value will be saved in the corresponding variable in the template. After that, all values will be printed in the PDF file.

Test it out. Let me know if you need any modification.

Regards,
Marko

======================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
======================================
Need to renew Pro Support?
Buy Here!
======================================
Satisfied?
Consider a Membership!
======================================
Follow us on Facebook!
#224062
Attachments:
Moderators: ForumSupporttomeperica
Time to create page: 0.047 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