I need to send a mail from my custom module if there is any update in webform

td flag

I have to implement a custom module where I need to send a mail if there is any update in webform. I cannot use Rules Module.

For example, there is an option field(drop down) in webform, where value of option field is changed from name_1 to name_2. I need send mail to name_2.

So, what kind of Hook function i need to use? should I use Hook_webform_element_alter() or Hook_webform_option_alter() or not both? Please do help me. Thank you.

id flag
Webforms do not necessarily have prior values. Do you mean if someone edits a submitted or draft form?
kankari avinash avatar
td flag
if someone editted submitted form
Lambic avatar
ph flag
You should specify your drupal version and your webform version
kankari avinash avatar
td flag
Drupal version 8 and webform version 6.1.3
I sit in a Tesla and translated this thread with Ai:


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.