Hi there,
I am really hoping someone can help me here with php knowledge.
I am currently using Fabrik component in a Joomla website which works fine, I attempted to resolve my issue in Fabrik forum but no one seems to reply for 3 days?
Anyway,
I am currently using an Email template to generate emails upon new form completion, which works fine. What I am trying to do is duplicate that same template and use it for form editing/updates. My goal is to have the elements be Bold or highlighted if they have been changed from the original data.
Although my request seems rather simple, I cant find a solution that works for the life of me. I am ok with any solution as long as I am able to differentiate what was changed or updated in the email I get.
Here is the code I currently use for my email template for new orders, what can I do to make this work for edited forms?
Your help is much appreciated, and thank you for your time! And I apologize if I am in the wrong place.
<html>
<head>
<title>Sales Order Sheet from {act_sales_order_sheet___submitted_by} for {act_sales_order_sheet___customer}</title>
</head>
<body>
{act_sales_order_sheet___submitted_by} has submitted a Sales Order Sheet for {act_sales_order_sheet___customer}.<br/>
This email contains the details and prodcut requirements.<br/><br/>
To view this Sales Order in web browser <a href="https://secure.allcelltech.com/forms/sales-order-history/details/4/{act_sales_order_sheet___id}">click here</a>.<br/>
To view all Sales Orders <a href="https://secure.allcelltech.com/forms/sales-order-history">click here</a>.
<br/><br/>
<table>
<?php
if ($_REQUEST['act_sales_order_sheet___update_yesno'])
echo '<tr><td>Is this an update to a current form?:</td><td>{act_sales_order_sheet___update_yesno}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___update_text'])
echo '<tr><td>Update Notes:</td><td>{act_sales_order_sheet___update_text}</td></tr>';
?>
<br/>
<tr><td><b>Sales Information</b></td></tr>
<tr><td width="200">PO#:</td><td>{act_sales_order_sheet___po}</td></tr>
<tr><td>Quote#:</td><td>{act_sales_order_sheet___quote_no}</a></td></tr>
<?php
if ($_REQUEST['act_sales_order_sheet___due_date'])
echo '<tr><td>Due Date:</td><td>{act_sales_order_sheet___due_date}</td></tr>';
?>
<tr><td>Application:</td><td>{act_sales_order_sheet___application}</td></tr>
<?php
if ($_REQUEST['act_sales_order_sheet___customer'])
echo '<tr><td>Customer:</td><td>{act_sales_order_sheet___customer}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___ship_to'])
echo '<tr><td>Ship To:</td><td>{act_sales_order_sheet___ship_to}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___bill_to'])
echo '<tr><td>Billing:</td><td>{act_sales_order_sheet___bill_to}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___ship_via'][0])
echo '<tr><td>Ship Via:</td><td>' . $_REQUEST['act_sales_order_sheet___ship_via'][0] . '</td></tr>';
if ($_REQUEST['act_sales_order_sheet___ship_account'])
echo '<tr><td>Acct#:</td><td>{act_sales_order_sheet___ship_account}</td></tr>';
?>
<tr><td>Contact Name:</td><td>{act_sales_order_sheet___contact_name}</td></tr>
<tr><td>Contact Email:</td><td><a href="mailto:{act_sales_order_sheet___contact_email}">{act_sales_order_sheet___contact_email}</a></td></tr>
<tr><td>Contact Phone:</td><td>{act_sales_order_sheet___phone}</td></tr>
<?php
if ($_REQUEST['act_sales_order_sheet___payments_terms'])
echo '<tr><td>Payment Terms:</td><td>{act_sales_order_sheet___payments_terms}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___down_payment_amount'])
echo '<tr><td>Down Payment Amount:</td><td>{act_sales_order_sheet___down_payment_amount}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___hold_accounting'])
echo '<tr><td>Hold for Accounting?:</td><td>{act_sales_order_sheet___hold_accounting}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___sales_invoice_review_required'])
echo '<tr><td>Sales Invoice Review Required?:</td><td>{act_sales_order_sheet___sales_invoice_review_required}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___shipping_instructions'])
echo '<tr><td>Shipping Instructions:</td><td>{act_sales_order_sheet___shipping_instructions}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___sales_price'])
echo '<tr><td>Sales Price:</td><td>{act_sales_order_sheet___sales_price}</td></tr>';
?>
</table>
<br/>
<?php
if ($_REQUEST['act_sales_order_sheet___international']) {
if ($_REQUEST['act_sales_order_sheet___shipping_terms'])
echo '<tr><td><b>Shipping Terms:<b></td><td>{act_sales_order_sheet___shipping_terms}</td></tr>';
?>
<table>
<tr><td width="200"><b>International Information</b></td></tr>
<?php
if ($_REQUEST['act_sales_order_sheet___incoterms'][0])
echo '<tr><td>Incoterms:</td><td>' . $_REQUEST['act_sales_order_sheet___incoterms'][0] . '</td></tr>';
if ($_REQUEST['act_sales_order_sheet___value'])
echo '<tr><td>Value:</td><td>{act_sales_order_sheet___value}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___broker_name'])
echo '<tr><td>Broker Name:</td><td>{act_sales_order_sheet___broker_name}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___broker_address'])
echo '<tr><td>Broker Address:</td><td>{act_sales_order_sheet___broker_address}</td></tr>';
?>
</table>
<br/>
<?php
}
?>
<table>
<tr><td width="200"><b>Battery Information</b></td></tr>
<?php
if ($_REQUEST['act_sales_order_sheet___voltage'][0])
echo '<tr><td>Voltage:</td><td>{act_sales_order_sheet___voltage}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___capacity'])
echo '<tr><td>Capacity:</td><td>{act_sales_order_sheet___capacity}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___cells_in_series'])
echo '<tr><td>Cells in Series:</td><td>{act_sales_order_sheet___cells_in_series}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___cells_in_parallel'])
echo '<tr><td>Cells in Parallel:</td><td>{act_sales_order_sheet___cells_in_parallel}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___quantity'])
echo '<tr><td>Quantity:</td><td>{act_sales_order_sheet___quantity}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___allcell_part_number'])
echo '<tr><td>AllCell Part #:</td><td>{act_sales_order_sheet___allcell_part_number}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___prototype'])
echo '<tr><td>Prototype:</td><td>{act_sales_order_sheet___prototype}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___wax_temp'])
echo '<tr><td>Wax Temp:</td><td>{act_sales_order_sheet___wax_temp}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___cell_type'])
echo '<tr><td>Cell Type:</td><td>{act_sales_order_sheet___cell_type}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___cell_quantity'])
echo '<tr><td>Cell Quantity:</td><td>{act_sales_order_sheet___cell_quantity}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___bms_type'])
echo '<tr><td>BMS Type:</td><td>{act_sales_order_sheet___bms_type}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___case'])
echo '<tr><td>Case:</td><td>{act_sales_order_sheet___case}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___charger'])
echo '<tr><td>Charger:</td><td>{act_sales_order_sheet___charger}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___charger_amps'])
echo '<tr><td>Charger Amps:</td><td>{act_sales_order_sheet___charger_amps}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___charger_quanity'])
echo '<tr><td># of Chargers:</td><td>{act_sales_order_sheet___charger_quanity}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___chargers_price'])
echo '<tr><td>Chargers Price:</td><td>{act_sales_order_sheet___chargers_price}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___connector_type'])
echo '<tr><td>Connector Type:</td><td>{act_sales_order_sheet___connector_type}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___dimensional_restrictions'])
echo '<tr><td>Dimensional Restrictions:</td><td>{act_sales_order_sheet___dimensional_restrictions}</td></tr>';
if ($_REQUEST['act_sales_order_sheet___special_notes'])
echo '<tr><td>Special Notes:</td><td>{act_sales_order_sheet___special_notes}</td></tr>';
?>
</table>
<p>NOTE: This email was automatically generated from AllCell Technologies (<a href="http://www.allcelltech.com">http://www.allcelltech.com</a>)</p>
</body>
</html>