Hallo zusammen
Seit mehr als zwei Tagen komme ich nicht mehr weiter und bitte euch daher um Hilfe.
Ich habe ein Formular erstellt (Quickmode), es funktioniert alles gut, danach habe ich ein einfaches PDF-Template erstellt für den den Anhang als E-Mail.
Im Formular habe ich die Funktionen mit turn on/off, funktioniert ebenfalls gut.
Mein Problem ist, dass alle Felder im PDF ausgegeben werden
Im Formular ist
option_b eine Checkbox und soll bei "checked" im PDF
amount_iml nicht anzeigen.
Im Formular funktioniert es, jedoch nicht im PDF, es wird alles angezeigt, könnt ihr mir hier dafür einen Tipp geben, ich bin kein Php Freak daher sind meine Kenntnisse beschränkt , Besten Dank !
Mein code im PDF-Template
<?php
/**
* BreezingForms - A Joomla Forms Application
* @version 1.7.2
* @package BreezingForms
* @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
$rank = '';
$first_name = '';
$last_name = '';
$zip_code_city = '';
$country = '';
$jahrgang = '';
$e_mail = '';
$option_a = '';
$km_iml_sat = '';
$km_iml_sun = '';
$amount_iml = '';
$option_b = '';
$km_sat = '';
$km_sun = '';
$total_ivv = '';
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 'rank':
$rank = $value;
break;
case 'first_name':
$first_name = $value;
break;
case 'last_name':
$last_name = $value;
break;
case 'street':
$street = $value;
break;
case 'zip_code_city':
$zip_code_city = $value;
break;
case 'country':
$country = $value;
break;
case 'amount_iml':
$amount_iml = $value;
break;
case 'e_mail':
$e_mail = $value;
break;
case 'option_a':
$option_a = $value;
break;
case 'option_b':
$option_b = $value;
break;
case 'km_iml_sat':
$km_iml_sat = $value;
break;
case 'km_iml_sun':
$km_iml_sun = $value;
break;
case 'amount_iml':
$altersklasse = $value;
break;
case 'km_sat':
$km_sat = $value;
break;
case 'km_sun':
$km_sun = $value;
break;
case 'amount_ivv':
$total_ivv = $value;
break;
}
}
}
?>
</head>
<body>
<table style="border: none; ">
<tr>
<th width="56" style="font-size: 0.8em; color: #333333;"><span style="font-size: 0.8em; color: #333333; font-family: Tahoma, Arial, Geneva, sans-serif; "><img height="63" width="52" style="margin: 5px auto; margin-left:0; vertical-align: left; display: block;" alt="Logo von
www.2test.ch" src="http://2test/images/Logo/Logo.png" />
<td width="353" style="font-size: 1.0em; color: #333333;"> <div align="center">
</tr>
</table>
<p> </p>
<p><span style="font-size: 0.8em; color: #333333; font-family: Tahoma, Arial, Geneva, sans-serif;
</span></p>
<h2 style="font-size: 1.1em; color: #FD7805;"> <br>
<p style="font-size: 0.8em; color: #333333; font-family: Tahoma, Arial, Geneva, sans-serif; "> </p>
<h3 style="font-size: 1.0em; color: #FD7805;"> <br>Hier sind Ihre Daten: </h3>
<table width="475" style="border: none; ">
<tr>
<th width="129" height="55" style="font-size: 0.8em; color: #333333;">
<strong>Date of registration</strong></th>
<td width="162" style="font-size: 0.8em; color: #333333;"><?php echo date("d.m.Y\ H:i")?></td>
<td width="162" style="font-size: 0.8em; color: #333333;"> </td>
</tr>
<tr>
<th height="21" style="font-size: 0.8em; color: #333333;"><strong>Rank</strong></th>
<td style="font-size: 0.8em; color: #333333;"><?php echo $rank; ?></td>
<td style="font-size: 0.8em; color: #333333;"> </td>
</tr>
<tr>
<th height="21" style="font-size: 0.8em; color: #333333;">
<strong>First name</strong></th>
<td style="font-size: 0.8em; color: #333333;"><?php echo $first_name; ?></td>
<td style="font-size: 0.8em; color: #333333;"> </td>
</tr>
<tr>
<th height="17" style="font-size: 0.8em; color: #333333;">
<strong>Last name</strong></th>
<td style="font-size: 0.8em; color: #333333;"><?php echo $last_name; ?></td>
<td style="font-size: 0.8em; color: #333333;"> </td>
</tr>
<tr>
<th height="17" style="font-size: 0.8em; color: #333333;">
<strong>Street</strong></th>
<td style="font-size: 0.8em; color: #333333;"><?php echo $street; ?></td>
<td style="font-size: 0.8em; color: #333333;"> </td>
</tr>
<tr>
<th height="17" style="font-size: 0.8em; color: #333333;">
<strong>Zip Code /City</strong></th>
<td style="font-size: 0.8em; color: #333333;"><?php echo $zip_code_city; ?></td>
<td style="font-size: 0.8em; color: #333333;"> </td>
</tr>
<tr>
<th height="17" style="font-size: 0.8em; color: #333333;">
<strong>Country</strong></th>
<td style="font-size: 0.8em; color: #333333;"><?php echo $country; ?></td>
<td style="font-size: 0.8em; color: #333333;"> </td>
</tr>
<tr>
<th style="font-size: 0.8em; color: #333333;">
<strong>Year of birth</strong></th>
<td style="font-size: 0.8em; color: #333333;"><?php echo $jahrgang; ?></td>
<td style="font-size: 0.8em; color: #333333;"> </td>
</tr>
<tr>
<th height="17" style="font-size: 0.8em; color: #333333;"><strong>E-Mail</strong></th>
<td style="font-size: 0.8em; color: #333333;"><?php echo $e_mail; ?></td>
<td style="font-size: 0.8em; color: #333333;"> </td>
</tr>
<tr>
<th height="17" style="font-size: 0.8em; color: #333333;"> </th>
<td style="font-size: 0.8em; color: #333333;"> </td>
<td style="font-size: 0.8em; color: #333333;"><div align="center">Price</div></td>
</tr>
<tr>
<th height="17" style="font-size: 0.8em; color: #333333;"><strong>Medal/Pin + IML + IVV-VSL/EVG Stemp for two days</strong></th>
<td style="font-size: 0.8em; color: #333333;"><div align="center"><?php echo $option_a; ?></div></td>
<td style="font-size: 0.8em; color: #333333;"><div align="center"><?php echo $altersklasse; ?></div></td>
</tr>
<tr>
<th height="17" style="font-size: 0.8em; color: #333333;"> </th>
<th height="17" style="font-size: 0.8em; color: #333333;"> </th>
<td style="font-size: 0.8em; color: #333333;"> </td>
</tr>
<tr>
<th height="17" style="font-size: 0.8em; color: #333333;"> </th>
<th height="17" style="font-size: 0.8em; color: #333333;"> </th>
<td style="font-size: 0.8em; color: #333333;"> </td>
</tr>
<tr>
<th height="17" style="font-size: 0.8em; color: #333333;">
</table>
<p><span style="font-size: 0.8em; color: #333333; font-family: Tahoma, Arial, Geneva, sans-serif; "> <br>
<p><span style="font-size: 0.8em; color: #333333; font-family: Tahoma, Arial, Geneva, sans-serif; "> <br>