Closed (fixed)
Project:
Webform
Version:
7.x-3.18
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Oct 2012 at 18:49 UTC
Updated:
2 Jul 2013 at 00:00 UTC
Jump to comment: Most recent file
In a webform with an invalid e-mail address for sending the submission, choosing the option to resend the e-mail is intended to add " (empty)" after the missing or otherwise invalid address. Instead, it uses a hold-over from the D6 FAPI, appending to ['#value"] in the form, rather than the D7 ['#markup']. This throws a notice in the log and of course doesn't work.
In webform.submissions.inc, function webform_submission_resend:
...
$valid_email = !empty($email_addresses[0]) && valid_email_address($email_addresses[0]);
...
$form['emails'][$eid]['email'] = array(
'#markup' => implode('<br />', $email_addresses),
);
if (!$valid_email) {
$form['emails'][$eid]['email']['#value'] .= ' (' . t('empty') . ')'; // <-- should be '#markup'
}
'#value' should of course be '#markup'.
This should be applied to the 7.x-4.x branch, too, I presume. 3.x branch patch to follow.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | resend_form_markup-1803702-1.patch | 686 bytes | danchadwick |
Comments
Comment #1
danchadwick commentedPatch making above trivial fix.
Comment #2
quicksketchThanks! Great little fix. Sorry this took so long to review. Committed to D7 branches.