HI All,
Got a question about adding ghost values for a custom form. The emails are, of course, showing field values even when not checked. I saw a post from Bob where he offered an option to create an array from the possible values of the check boxes.
So I have this:
And added the custom action before the email as such:
This doesn't seem to have the the right solution.
Any thoughts?
Got a question about adding ghost values for a custom form. The emails are, of course, showing field values even when not checked. I saw a post from Bob where he offered an option to create an array from the possible values of the check boxes.
So I have this:
<tr align="left" valign="top">
<td colspan="2">
<table width="596" border="0" cellpadding="3" cellspacing="3" class="forms">
<tbody>
<tr align="center" valign="top">
<td width="244" align="left"><input type="checkbox" name="OPTIONAL_EQUIPMENT" value="Pallet Dispenser"> Pallet dispenser</td>
<td width="329" align="left"><input type="checkbox" name="OPTIONAL_EQUIPMENT" value="Bottom Layer Sheet Dispenser"> Bottom layer sheet dispenser</td>
</tr>
<tr align="center" valign="top">
<td align="left" valign="middle"><input type="checkbox" name="OPTIONAL_EQUIPMENT" value="Tier Sheet Dispenser"> Tier sheet dispenser </td>
<td align="left"><input type="checkbox" name="OPTIONAL_EQUIPMENT" value="Discharge Conveyor"> Discharge conveyor (# of loads)<input name="DISCHARGE_CONVEYOR_NUMBER_OF_LOADS" type="text" id="DISCHARGECONVERYLOADS2" size="10"></td>
</tr>
<tr align="center" valign="top">
<td align="left"><input type="checkbox" name="OPTIONAL_EQUIPMENT" value="Bag Flattener"> Bag flattener </td>
<td align="left"> </td>
</tr>
</tbody>
</table>
</td>
</tr>
And added the custom action before the email as such:
<?php
$OPTIONAL_EQUIPMENT = array (
'Pallet dispenser',
'Bottom layer sheet dispenser',
'Tier sheet dispenser',
'Bag flattener',
'Discharge conveyor (# of loads)'
);
foreach ( $OPTIONAL_EQUIPMENT as $k ) {
if ( !isset($form->data['OPTIONAL_EQUIPMENT_list_'.$k]) ) {
$form->data['OPTIONAL_EQUIPMENT_list_'.$k] = '-';
}
}
?>
This doesn't seem to have the the right solution.
Any thoughts?