• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Hide unpopulated fields in admin email

Hide unpopulated fields in admin email 11 years 9 months ago #18246

Hi I have created a 2 page form with a lot of conditions, page 2 can be any one of 5 pages depending on the selection on page 1 >>>> www.irishbirthcerts.com/ <<<<

My question is can I hide the unpopulated fields in the Admin email? currently the email sends ALL the fields making it a little more difficult to weed through the email for the information required,
The administrator has disabled public write access.

Re: Hide unpopulated fields in admin email 11 years 9 months ago #18265

Hi buddy. Have you tried creating a support ticket on this yet?
The administrator has disabled public write access.

Re: Hide unpopulated fields in admin email 11 years 9 months ago #18272

Hi
No not yet! I thought someone here might have an idea how to do it, I came across this www.rsjoomla.com/support/documentation/v...p-email-scripts.html it might help me, if not I will open a ticket soon B)
The administrator has disabled public write access.

Hide unpopulated fields in admin email 11 years 5 months ago #20157

Hi all,

I have the same problem - 1 page with a selector which output many conditional fields. The rules php code in that article I filled in in the tab php-email-scripts under tab $adminEmail.

I tried 1 field, copied exactly from the Quick add, but it doesn't work for me, the caption is still shown in the user email.

Second question is, do I have to made those rules for every conditional empty field? Thats a lot of work with about 150 conditional fields in my form?? Maybe there is some 'common' php script which solve this problem?

Thanks already!
The administrator has disabled public write access.

Hide unpopulated fields in admin email 11 years 4 months ago #20331

  • info921
  • info921's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 1
I have the same problem! Please can we have a How To on this subject ?

Thanks
The administrator has disabled public write access.

Hide unpopulated fields in admin email 11 years 4 months ago #20407

Anybody an idea yet?

I think this is a problem of more people. I use additional fields all the time and also forms with a lot of fields that can be empty when submit that form.
The administrator has disabled public write access.

Hide unpopulated fields in admin email 11 years 4 months ago #20422

  • upbm
  • upbm's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 34
  • Thank you received: 4
Script available at the bottom of the page www.rsjoomla.com/support/documentation/v...p-email-scripts.html works perfectly, I adapted the script in a form to hide conditional fields in email user and administrator, and there is no problem.

Didier

Part of my script for User mail :
$modUserEmailText = $form->UserEmailText;
if($_POST['form']['Adherent'] == 'Oui')
	$modUserEmailText = str_replace('{RepasNA:caption}: {RepasNA:value}','',$modUserEmailText);
	else 
	$modUserEmailText = str_replace('{RepasA:caption}: {RepasA:value}','',$modUserEmailText);
$userEmail['text'] = $modUserEmailText;
$userEmail['text'] = str_replace($placeholders, $values, $userEmail['text']);

and for Admin mail
$modAdminEmailText = $form->AdminEmailText;
if($_POST['form']['Adherent'] == 'Oui')
	$modAdminEmailText = str_replace('{RepasNA:caption}: {RepasNA:value}','',$modAdminEmailText);
	else 
	$modAdminEmailText = str_replace('{RepasA:caption}: {RepasA:value}','',$modAdminEmailText);          
$adminEmail['text'] = $modAdminEmailText;
$adminEmail['text'] = str_replace($placeholders, $values, $adminEmail['text']);
Last Edit: 11 years 4 months ago by upbm.
The administrator has disabled public write access.

Hide unpopulated fields in admin email 11 years 4 weeks ago #22310

  • barback
  • barback's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
  • Thank you received: 3
$modUserEmailText = $form->UserEmailText;
if($_POST == 'Oui')
$modUserEmailText = str_replace('{RepasNA:caption}: {RepasNA:value}','',$modUserEmailText);
else
$modUserEmailText = str_replace('{RepasA:caption}: {RepasA:value}','',$modUserEmailText);
if($_POST == 'Oui')
$modUserEmailText = str_replace('{RepasNA:caption}: {RepasNA:value}','',$modUserEmailText);
else
$modUserEmailText = str_replace('{RepasA:caption}: {RepasA:value}','',$modUserEmailText);
...
$userEmail = $modUserEmailText;
$userEmail = str_replace($placeholders, $values, $userEmail);

I'm guessing that to possibly omit many fields that might be blank you'd have to repeat the if....else sections for each field as I've done above?
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!