• 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: Removing empty fields from emails

Removing empty fields from emails 12 years 5 months ago #19715

  • paypal14
  • paypal14's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 21
I know there is a tutorial on this, but, like all RSJoomla tutorials, it's designed for geeks and not for less geek coders like me.

I have tried on 4 occasions, all with a total lack of success, to get this scripting working. Every time I've have gone back and forward with support getting it going. Yes the forms all now work properly, but I have yet to get real help. You did this, this and this wrong; these are things to look for if your script does not work, etc.

I have cut and pasted a script from an existing, working form, and modified the field names, but just cannot make it work. RS Forms isn't a bad component, but it seems way more targeted at people who are code gurus unless all you want is a super basic form.

The code I'm trying to make work on a field called Phone is this:
$modUserEmailText = $form->UserEmailText;
 
if($_POST['form']['Phone'] == '')
$modUserEmailText = str_replace('{Phone:caption}: {Phone:value},','',$modUserEmailText);
 
$userEmail['text'] = $modUserEmailText;
$userEmail['text'] = str_replace($placeholders, $values, $userEmail['text']);
and
$modAdminEmailText = $form->AdminEmailText;
 
if($_POST['form']['Phone'] == '')
$modAdminEmailText = str_replace('{Phone:caption}: {Phone:value},','',$modAdminEmailText);
 
$adminEmail['text'] = $modAdminEmailText;
$adminEmail['text'] = str_replace($placeholders, $values, $adminEmail['text']);

Why they can't have this handled by the component like other devs have done is beyond me.
The administrator has disabled public write access.

Re: Removing empty fields from emails 12 years 5 months ago #19718

Hello,

What are you trying to accomplish?
Since the last versions I removed many scripts from my forms.
Regards
Wilco Alsemgeest

Please note: my help is not official customer support. To receive your support, submit a ticket by clicking www.rsjoomla.com/my-support-tickets.html
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!