Home › Forums › Quform PHP › Removing form data from notification email.
- This topic has 1 reply, 2 voices, and was last updated 9 years, 1 month ago by Ally.
- AuthorPosts
- October 16, 2015 at 7:00 am #17139DaveParticipant
Hi,
I have had no problem adding HTML or PHP code to the notification email. The problem I am having is modifying any of the notification code to hide the form data. The data is going to a data base and I don’t want it in the notification email. I do want and am using the extra data area.
I’d just like to remove the code where the form data label and values are echo’ed. But whenever I change any of the code in the enclosing php or html, no email is sent.The code I am referring to is:
…<?php if (!defined(‘QUFORM_ROOT’)) exit; ?><html>
<body leftmargin=”0″ marginwidth=”0″ topmargin=”0″ marginheight=”0″>
<table width=”100%” cellpadding=”0″ cellspacing=”0″ border=”0″>
<tr>
<td valign=”top” style=”padding: 25px;”><table width=”600″ cellpadding=”0″ cellspacing=”0″ border=”0″ style=”font: 14px Helvetica, Arial, sans-serif;”>
<tr>
<td valign=”top” style=”font-family: Helvetica, Arial, sans-serif; font-size: 25px; font-weight: bold; color: #282828; padding-bottom: 10px;”><?php echo Quform::escape($mailer->Subject); ?></td>
</tr>
<tr>
<td valign=”top”><table width=”100%” border=”0″ cellpadding=”2″ cellspacing=”0″>
<?php foreach ($form->getElements() as $element) : ?>
<?php if (!$element->isHidden() && ($config[‘showEmptyFields’] || (!$config[‘showEmptyFields’] && !$element->isEmpty()))) : ?>
<tr>
<td valign=”top” style=”font-family: Helvetica, Arial, sans-serif; font-size: 17px; font-weight: bold; color: #282828; width: 25%;”><?php echo Quform::escape($element->getLabel())?></td>
<td valign=”top” style=”font-family: Helvetica, Arial, sans-serif; color: #282828; line-height: 130%; width: 75%;”>
<?php echo $element->getValueHtml(); ?>
</td>
</tr>
<?php endif; ?>
<?php endforeach; ?>
<?php if (isset($config[‘extra’]) && is_array($config[‘extra’]) && count($config[‘extra’])) : ?>
<?php foreach ($config[‘extra’] as $key => $value) : ?>
<tr>
<td valign=”top” style=”font-family: Helvetica, Arial, sans-serif; font-size: 17px; font-weight: bold; color: #282828; width: 25%;”><?php echo Quform::escape($key); ?></td>
<td valign=”top” style=”font-family: Helvetica, Arial, sans-serif; color: #282828; line-height: 130%; width: 75%;”><?php echo $value; ?></td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</table>
</td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>…How do I edit this part of the code?
Thanks for any help.October 19, 2015 at 10:53 am #17151AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- AuthorPosts
- You must be logged in to reply to this topic.