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
Autoresponder with form fields that are empty
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/forms.html
http://www.wysiwygwebbuilder.com/form_wizard.html
Frequently Asked Questions about Forms
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/forms.html
http://www.wysiwygwebbuilder.com/form_wizard.html
Frequently Asked Questions about Forms
-
-
- Posts: 10
- Joined: Tue Jan 18, 2022 5:38 pm
Re: Autoresponder with form fields that are empty
Sorry. there is no way to prevent this, because if the value is not in the $POST array then the script has no way to know that it needs to be replaced in the text.
-
-
- Posts: 10
- Joined: Tue Jan 18, 2022 5:38 pm
==CLOSED==Re: Autoresponder with form fields that are empty
Thanks anyway,
John Pittman
John Pittman
-
-
- Posts: 10
- Joined: Tue Jan 18, 2022 5:38 pm
Re: Autoresponder with form fields that are empty
FYI,
I figured out a way to get what I needed to work.
The problem was a not required selection list on the for saved as group[].
I just add another selection of "none" with a value of " " and default of selected
That way if the user did not make a selection my auto responder message would just have the variable replaced with a " ".
Works good for me now without needing to muck around in the page or form php code.
John Pittman
I figured out a way to get what I needed to work.
The problem was a not required selection list on the for saved as group[].
I just add another selection of "none" with a value of " " and default of selected
That way if the user did not make a selection my auto responder message would just have the variable replaced with a " ".
Works good for me now without needing to muck around in the page or form php code.
John Pittman