This solution was supplied by the great support team @ RSJoomla
The Problem
In dropdown select fields I use '== select ==' as the first item then other choices below it, the problem with this is that it is treated as input data when form data is sent via user and admin emails. If this field is not selected by the user that field caption & value are still included in the email. in the form I created there were a lot of these making the email being sent displaying a lot of useless data and the client would have to sift through all of it to find the actual relevant information.
I found the following solution here
http://www.rsjoomla.com/forum/37-rsform-pro/18246-hide-unpopulated-fields-in-admin-email.html#20422
This worked for me...
$modUserEmailText = $form->UserEmailText;
if($_POST['form']['my_field_name01'] == '== select ==')
$modUserEmailText = str_replace('{my_field_name01:caption}: {my_field_name01:value}','',$modUserEmailText);
else
$modUserEmailText = str_replace('{my_field_name01:caption}: {my_field_name01:value}','',$modUserEmailText);
$userEmail['text'] = $modUserEmailText;
$userEmail['text'] = str_replace($placeholders, $values, $userEmail['text']);
I don't know why the 'else' is there but without it it didn't work.
This presented a 'I'm too lazy' problem because I didn't want to do the above code another 40 time for e.g.'my_field_name01, my_field_name02' etc.
After contacting RSJoomla Support they supplied me with the following...
$modUserEmailText = $form->UserEmailText;
$fieldNames = array ('my_field_name01','my_field_name02','my_field_name03','my_field_name04');
foreach ($fieldNames as $field)
{
if ($_POST['form'][$field][0] == '== select ==')
$modUserEmailText = str_replace('{'.$field.':caption}:{'.$field.':value}','',$modUserEmailText);
}
$userEmail['text'] = $modUserEmailText;
$userEmail['text'] = str_replace($placeholders, $values, $userEmail['text']);
This worked perfectly, I also had a lot of text fields displaying the number value '00' so the below code was suggested
$modUserEmailText = $form->UserEmailText;
$fieldNames = array ('my_field_name01','my_field_name02','my_field_name03','my_field_name04');
foreach ($fieldNames as $field)
{
if (($_POST['form'][$field][0] == '== select ==') || ($_POST['form'][$field][0] == '00'))
$modUserEmailText = str_replace('{'.$field.':caption}:{'.$field.':value}','',$modUserEmailText);
}
$userEmail['text'] = $modUserEmailText;
$userEmail['text'] = str_replace($placeholders, $values, $userEmail['text']);
I hope this helps others, and thank you again RSJoomla Support.