0

I am trying to build an email confirmation utility into a web application. For some other project I might just use jQuery to insert a new text field beneath my email field and compare their input as soon as the user finishes typing into the created textfield.

The problem is the email authentication will fail if a user does not have javascript enabled on his/her browser.

To overcome this problem, I want to use code to programmatically create and insert a second textfield immediately after the actual email field and compare their input when the user submits.

What I don't know is what webform hook(s) I can use to create an email component.

Can anyone help with some information and/or code samples, please?

1 Answer 1

1
$email = array(
  'nid' => $node->nid,
  'email' => '[email protected]',
  'subject' => 'default',
  'from_name' => 'default',
  'from_address' => 'default',
  'template' => 'default',
  'excluded_components' => array(),
);
webform_email_insert($email);

Check this post for more info.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.