Best way to replace dynamic values?
Using the basic templates that come with Universal Email we are able to quickly create usable email templates that populate all the values from the parent form. Cool!
We can also use the Remove function to exclude some inputs from the results. Great.
What would be the best coding method to replace a found Post value with something more user friendly?
Is it a second layer of String Replace? Though that seems confusing as the current method steps through an array of values.
Seems we'd need create a list of the known Post values and then replace those when encountered. Any tips on best practice on how to do this? The reason is I've changed the ID of the Comment area to thwart spam bots using Xrumer which is ridiculously effective and bypassing Honeypot and even ReCaptcha validation methods.
Target area:
<?php echo(str_replace("_"," ",$pkey)); ?>
Full Code from area in question:
<?php
foreach( $_POST as $pkey => $pval ){
if (!RemoveValue($pkey,$remove,$removeBegins,$removeEnds,$removeIncludes)) {
?>
<tr valign="top">
<th style="font-size: 12px; width: 134px; text-align: right; padding: 3px 10px 3px 3px; font-weight: bold;"><?php echo(str_replace("_"," ",$pkey)); ?>:</th>
<td style="font-size: 12px; padding: 3px;"><?php echo(str_replace("\n","<BR />",(is_array($pval)?implode(", ",$pval):$pval))); ?></td>
</tr>
<?php
}
}
?>