I'm struggling with this and was hoping to find some quick assistance.
I've read a number of previous posts on hiding empty fields from displaying on email notifications and I just can't seem to get it to work. I'm using this post in particular to address my situation - http://www.chronoengine.com/forums.html?cont=posts&f=5&t=20922&p=64695&hilit=hide+empty+fields#p64695
I've identified the fields that I want to hide if they are empty and have placed them in a custom code onSubmit action before the email send -
However, I'm finding that the email form still shows all empty fields in brackets and I'd like to remove them.
Can the fields be required?
Is a custom code action correct for the php?
I thought I was following the threads pretty well, but it's clear I'm doing something wrong...
I've read a number of previous posts on hiding empty fields from displaying on email notifications and I just can't seem to get it to work. I'm using this post in particular to address my situation - http://www.chronoengine.com/forums.html?cont=posts&f=5&t=20922&p=64695&hilit=hide+empty+fields#p64695
I've identified the fields that I want to hide if they are empty and have placed them in a custom code onSubmit action before the email send -
<?php
$payername = JRequest::getString('payername', '', 'post');
JRequest::setVar('payername', $payername);
$payeraddress = JRequest::getString('payeraddress', '', 'post');
JRequest::setVar('payeraddress', $payeraddress);
$payercity = JRequest::getString('payercity', '', 'post');
JRequest::setVar('payercity', $payercity);
$payerzip = JRequest::getString('payerzip', '', 'post');
JRequest::setVar('payerzip', $payerzip);
$payerphone = JRequest::getString('payerphone', '', 'post');
JRequest::setVar('payerphone', $payerphone);
$payerwork = JRequest::getString('payerwork', '', 'post');
JRequest::setVar('payerwork', $payerwork);
$payercell = JRequest::getString('payercell', '', 'post');
JRequest::setVar('payercell', $payercell);
$bankname = JRequest::getString('bankname', '', 'post');
JRequest::setVar('bankname', $bankname);
$checkingacct = JRequest::getString('checkingacct', '', 'post');
JRequest::setVar('checkingacct', $checkingacct);
$routingnum = JRequest::getString('routingnum', '', 'post');
JRequest::setVar('routingnum', $routingnum);
$visa = JRequest::getString('visa', '', 'post');
JRequest::setVar('visa', $visa);
$mastercard = JRequest::getString('mastercard', '', 'post');
JRequest::setVar('mastercard', $mastercard);
$cc_acct = JRequest::getString('cc_acct', '', 'post');
JRequest::setVar('cc_acct', $cc_acct);
$cc_expire = JRequest::getString('cc_expire', '', 'post');
JRequest::setVar('cc_expire', $cc_expire);
$cc_verifynum = JRequest::getString('cc_verifynum', '', 'post');
JRequest::setVar('cc_verifynum', $cc_verifynum);
$cc_name = JRequest::getString('cc_name', '', 'post');
JRequest::setVar('cc_name', $cc_name);
$summertimes2 = JRequest::getString('summertimes2', '', 'post');
JRequest::setVar('summertimes2', $summertimes2);
?>
However, I'm finding that the email form still shows all empty fields in brackets and I'd like to remove them.
Can the fields be required?
Is a custom code action correct for the php?
I thought I was following the threads pretty well, but it's clear I'm doing something wrong...