Autoresponder with form fields that are empty
Posted: Tue Feb 08, 2022 8:57 pm
Hi,
I have a form that is working correctly, It submits the data to db and sends site owner email with data and sends the auto responder to the email address in the form, all great no problem.
But I wanted a personalized auto responder message so I went to "rich text" for body and then add the variable names to the message body like first name etc.
And it all works,, but the problem ....... when a form variable is "empty" then in the email received by the person the body text shows the variable by name any place there is an empty variable.
example==================================
Hi, John
I see you are interested in Dallas ,$interest2 and .....................
==========================================
Where $fname = "John" and $interst1 = "Dallas" and $interest2 =""
Is there a way to suppress the the empty $var
Thanks the old new guy
JohnPittman
I have a form that is working correctly, It submits the data to db and sends site owner email with data and sends the auto responder to the email address in the form, all great no problem.
But I wanted a personalized auto responder message so I went to "rich text" for body and then add the variable names to the message body like first name etc.
And it all works,, but the problem ....... when a form variable is "empty" then in the email received by the person the body text shows the variable by name any place there is an empty variable.
example==================================
Hi, John
I see you are interested in Dallas ,$interest2 and .....................
==========================================
Where $fname = "John" and $interst1 = "Dallas" and $interest2 =""
Is there a way to suppress the the empty $var
Thanks the old new guy
JohnPittman