Comments

nitesh sethia’s picture

Hi @Surmahi,

Thanks for requesting for a new feature in Webform Confirmation Module.

But I thing instead of extending this module, we should use the default functionality that Webform Module provides you.

On the Webform tab of your webform, you have a tab called as E-mails(/node/[webform_id]/webform/emails). You have the option to add Email address. After adding email address, it shows you an Email Template field.

In that you would have to paste a custom links something like the verification link. You would have to write a custom hook menu in your module. On click of the link from the mail, it would pick values from the url of whatever you have passed in the url.

You would have to write a callback for that menu. Something like

  function webform_confirmation_confirming_verification() {
  $mail_id = $_GET['email'];
  $hash_code = $_GET['hash'];
  global $base_url;
  $result = db_select('webform_confirmation', 'wc')
    ->fields('wc', array('hash', 'sender_email', 'status', 'webform_id'))
    ->condition('sender_email', $mail_id)
    ->condition('hash', $hash_code)
    ->execute()->fetchAll();
  if ($result[0]->status == 1) {
    drupal_set_message(t("You have already confirmed the submission."));
  }
  else {
    db_update('webform_confirmation')
      ->fields(array(
        'status' => 1,
      ))
      ->condition('sender_email', $mail_id)
      ->condition('hash', $hash_code)
      ->execute();
  }
  $webform_confirmation_redirect = variable_get('webform_confirmation_redirect');
  if (!empty($webform_confirmation_redirect)) {
    $webform_confirmation_redirect_link = $base_url . '/' . $webform_confirmation_redirect;
    drupal_goto($webform_confirmation_redirect_link);
  }
  else {
    drupal_goto();
  }
}

which I wrote for verification from anonymous user.

nitesh sethia’s picture

Status: Needs work » Closed (works as designed)
Surmahi’s picture

Hi! Nitesh Confirmation from the user is done using confirmaton url in the email template,even i can see the users who confirmed the emails however i want additional confirmation from the admin side.Presently it just filters the confirmed and unconfirmed users. View delete and edit options are there.How can I add this feature of admin approval?

Surmahi’s picture

I am looking for two stage confirmation. In this first level confirmation is from user side which is already working. The second level of confirmation should be through admin. This can potentially happen if request is shown as list on Result page under admin login. Once he gets list of users we can have checkbox against each row( only against users who has confirmed himself). This will help admin to update checkbox and submit his confirmation. When we see complete list we can show two columns under list (User confirmed and Admin confirmed).

This is generic requirement which is normally expected from multiple websites / portals and hence requesting to add at module level itself.

Thanks

Surmahi’s picture

Issue summary: View changes
nitesh sethia’s picture

Closed #2344637: Approval from the admin is required as duplicate of this issue.

Surmahi’s picture

Issue summary: View changes

@Nitesh atleast provide some solution before closing the issue.