TOPIC:

Vorformatiere Formulardaten als PDF Ausgäben? 3 years 6 months ago #223912

  • Topic Author
  • sakari
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 38
  • Thanks: 0
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

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

Vorformatiere Formulardaten als PDF Ausgäben? 3 years 6 months ago #223988

  • marko.bosnjak
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 2222
  • Karma: 44
  • Thanks: 279
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!

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

Vorformatiere Formulardaten als PDF Ausgäben? 3 years 6 months ago #224038

  • Topic Author
  • sakari
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 38
  • Thanks: 0
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

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

Vorformatiere Formulardaten als PDF Ausgäben? 3 years 6 months ago #224062

  • marko.bosnjak
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 2222
  • Karma: 44
  • Thanks: 279
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!
Attachments:

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

  • Page:
  • 1
Moderators: ForumSupport
Time to create page: 0.090 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

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!