Feb 11th, 2012, 5:34 PM
Ah, I see!
Are you using the Swift Mailer module, btw, or the default mail functionality? Just wondering, because you shouldn't see two senders: it *should* just default to "none" in the absence of a valid email address, so I'll log this as a bug.
But in the meantime, you could do this with the Submission Pre-Parser module.
http://modules.formtools.org/submission_pre_parser/
1. Just install that module, then create a new rule called "Default email address".
2. For the "When Executed" option, select either the API or "On form submission" checkboxes, depending on your form type.
3. For the PHP code section, add the following code:
You'll need to tweak the $_POST["email"] to whatever field name your email field has.
And that should be it!
- Ben
Are you using the Swift Mailer module, btw, or the default mail functionality? Just wondering, because you shouldn't see two senders: it *should* just default to "none" in the absence of a valid email address, so I'll log this as a bug.
But in the meantime, you could do this with the Submission Pre-Parser module.
http://modules.formtools.org/submission_pre_parser/
1. Just install that module, then create a new rule called "Default email address".
2. For the "When Executed" option, select either the API or "On form submission" checkboxes, depending on your form type.
3. For the PHP code section, add the following code:
PHP Code:
if (empty($_POST["email"]))
{
$_POST["email"] = "my@company.com";
}
You'll need to tweak the $_POST["email"] to whatever field name your email field has.
And that should be it!
- Ben