The core contact module allows an option where user can tick a checkbox to get a copy of the sent message. This would be a useful feature for webform too.

CommentFileSizeAuthor
#3 webform.webform.contact.yml4.35 KBjrockowitz
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

johnnny83 created an issue. See original summary.

jrockowitz’s picture

This feature is very specific contact forms. I think there might be a way to implement it using conditional handlers. Improving webform's server-side conditional logic is not on the immediate roadmap.

Still, I would like to at least make it feasible to implement conditional handlers using custom code, similar to How to programmatically alter destination email address.

jrockowitz’s picture

Status: Active » Closed (won't fix)
FileSize
4.35 KB

We just recently tweaked how tokens were being handled via [#2861976} and I realized that this feature can be implemented using a token in the confirmation checkbox's #return_value. It is also worth noting emails are only sent if a To, CC, or BCC email address is set.

The attached form is a little hacky but does work.

I am going to close this ticket because this feature is really to specific. At some point this type of feature could also be addressed by conditional emails.