- Issue created by @Toby Wild
- Merge request !6Issue #3419938: Not compatible with Resend functionality in Webform β (Open) created by Toby Wild
- π¦πΊAustralia Toby Wild
Pushed change to issue fork that wraps the code that changes the to_mail variable to check if we are coming from the webform_submission_resend form.
Also tested this code to ensure it still works when normal submissions are submitted, and everything appears to work correctly.
$_POST['form_id'] should always exist, as this is a FormHandler, which by definition must always be submitted from a Form with a form_id.
https://git.drupalcode.org/project/consultation/-/merge_requests/6
- Assigned to Kristen Pol
- πΊπΈUnited States Kristen Pol Santa Cruz, CA, USA
Assigning to myself for review.
- Status changed to RTBC
about 1 year ago 5:10am 20 February 2024 - πΊπΈUnited States Kristen Pol Santa Cruz, CA, USA
I've tested this and it's working as expected. Thanks for the detailed steps to reproduce and the fix.
I'll merge shortly.
- πΊπΈUnited States Kristen Pol Santa Cruz, CA, USA
Note that it would make sense to default the resent to_mail to the configured mail in this case so they can change it in the resend form. I'll take a look but maybe that should be a separate issue.
- πΊπΈUnited States Kristen Pol Santa Cruz, CA, USA
I'm not going to try to prepopulate the form field here but might need to do a hook form alter like:
/** * Implements hook_form_FORM_ID_alter(). */ function consultation_form_webform_submission_resend_alter(&$form, FormStateInterface $form_state, $form_id) { if (isset($form['message']['to_mail'])) { // @fixme Get the email address from the node. $email = get_email_address_here; if ($email) { $form['message']['to_mail']['#default_value'] = $email; } } }
-
Kristen Pol β
committed 4fba98c7 on 1.x
Issue #3419938 by Toby Wild, Kristen Pol: Not compatible with Resend...
-
Kristen Pol β
committed 4fba98c7 on 1.x
- Issue was unassigned.
- Status changed to Fixed
about 1 year ago 5:30am 20 February 2024 - πΊπΈUnited States Kristen Pol Santa Cruz, CA, USA
The fix has been merged and will be in the next release.
Automatically closed - issue fixed for 2 weeks with no activity.