How to Exclude Fields in the Auto Generated Email Message
You can exclude a field from being displayed in your message by navigating to the PHP Email Scripting area and locating the section named 'Script called before the User Email is sent'. Insert the following PHP code here:
$skippedFields = array( 'field_name', ); $userEmail['text'] = ''; foreach ($components as $component) { if (!isset($all_data[$component->ComponentId])) { continue; } $property = $all_data[$component->ComponentId]; if (in_array($property['NAME'], $skippedFields)) { continue; } $captionPlaceholder = '{' . $property['NAME'] . ':caption}'; $valuePlaceholder = '{' . $property['NAME'] . ':value}'; $userEmail['text'] .= "{if {$valuePlaceholder}}" . sprintf("<p><strong>%s</strong> %s</p>\n", $captionPlaceholder, $valuePlaceholder) . "{/if}"; } require_once __DIR__ . '/scripting.php'; RSFormProScripting::compile($userEmail['text'], $placeholders, $values); $userEmail['text'] = str_replace($placeholders, $values, $userEmail['text']);
If you need this for the Admin Email as well, replace '$userEmail' with '$adminEmail' in the code. Of course, you'll also need to replace 'field_name' with the actual name of your field that you want to be removed in the email message.
If you want to return Free Text fields in your message, make sure these are not set in the $skippedFields array.
