title: Uncaught TypeError: Cannot read property 'handler' of undefined
body: <p>I am trying to generate an email for forgot password in my project. But when ever i click the send password button it gives me an error:- Uncaught TypeError: Cannot read property 'handler' of undefined. Below is my code.
  I am Using the html classes created by webflow in my view and also the webflow. JS script. I am getting the error:-Uncaught TypeError: Cannot read property 'handler' of undefined in the below code of webflow.js. I want that when i click i should get the mail on my email id. I am using sendgrid for sending the email.</p>
  
  <p>my Js code:-</p>
  
  <pre><code> function addListeners() {
      listening = true;
  
      // Handle form submission for Webflow forms
      $doc.on('submit', namespace + ' form', function(evt) {
        var data = $.data(this, namespace);
        if (data.handler) {
          data.evt = evt;
          data.handler(data);
        }
      });
    }
  </code></pre>
  
  <p>My View code:-</p>
  
  <p>@model InCubatize.Models.User</p>
  
  <pre><code>@{
      ViewBag.Title = @Resources.LanguageResource.ForgotPasswordTitle;
  
  }
  
  &lt;div class="w-container logo_container"&gt;&lt;img class="login_logo" src="~/Images/images/Logo%20-%20Blue%20(V).png" width="100" alt="5488354fba4bc2be7fd98967_Logo%20-%20Blue%20(V).png"&gt;
    &lt;/div&gt;
    &lt;div class="w-container login_form_container"&gt;
      &lt;div class="w-form"&gt;
      @using (Html.BeginForm()) {
  
        &lt;div class="card_main login_card_nest" id="email-form" name="email-form" data-name="Email Form" data-redirect="/login"&gt;
       @Html.TextBoxFor(model =&gt; model.Email, new { @class="w-input login_textfield", id="Reg-Email", type="email", placeholder="Email", name="Reg-Email", data_name="Reg Email", required="required" })
          &lt;br /&gt;
          @Html.ValidationMessageFor(model =&gt; model.Email)
  
  
          &lt;input class="w-button login_button" type="submit" value="Recover my password" data-wait="Please wait..."&gt;
  
           @Html.ValidationSummary(true, "", new { @class= "ValidationSummaryMessages" })
  
  
  
  
  
          &lt;div class="login_textblock"&gt;New user?
              &lt;a href="~/#/user/register" class="tertiary_action_btn"&gt;Create account&lt;/a&gt;
  
          &lt;span class="back_to_login"&gt;
               &lt;a href="~/#/user/login" class="tertiary_action_btn forgot_text"&gt;Back to login&lt;/a&gt;&lt;/span&gt;
       &lt;/div&gt;
  
  
  
  
           &lt;/div&gt;}
        &lt;div class="w-form-done"&gt;
          &lt;p&gt;Thank you! Your submission has been received!&lt;/p&gt;
        &lt;/div&gt;
        &lt;div class="w-form-fail"&gt;
          &lt;p&gt;Oops! Something went wrong while submitting the form :(&lt;/p&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="~/Scripts/js/webflow.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>my HTTP Post method:-</p>
  
  <pre><code>  [HttpPost]
          public ActionResult ForgotPassword(string email)
          {
              try
              {
                  User lUser = new User();
  
                  var userQuery = from u1 in db.Users
                                  where u1.Email == email
                                  select u1;
                  List&lt;User&gt; userList = userQuery.ToList();
                  if (userList.Count &gt; 0)
                  {
                      foreach (User cu in userList)
                      {
                          if (cu.Status == (int)Enums.UserStatusType.Active)
                          {
                              string msg = HttpContext.GetGlobalResourceObject("LanguageResource", "ForgotYourPasswordEmailBody").ToString();
  
                              msg = msg.Replace("[FULLNAME]", cu.FullName);
  
                              string decryptedPassword = Encrypt.DecryptString(cu.Password);
                              decryptedPassword = decryptedPassword.Remove(0, cu.Id.ToString().Length);
                              msg = msg.Replace("[PASSWORD]", decryptedPassword);
  
                              string emailFrom = Helpers.CommonFunctions.GetApplicationSettingValue("SystemEmailId");
                              Emailer.SendEmail(cu.Email, HttpContext.GetGlobalResourceObject("LanguageResource", "ForgotYourPasswordEmailSubject").ToString(), msg, emailFrom);
  
                              ModelState.AddModelError("", HttpContext.GetGlobalResourceObject("LanguageResource", "ForgotYourPasswordEmailSuccessMessage").ToString());
                              return View();
                          }
                          else
                          {
                              ModelState.AddModelError("", HttpContext.GetGlobalResourceObject("LanguageResource", "InactiveUserMessage").ToString());
                              return View();
                          }
                      }
                  }
  
                  return View();
              }
              catch (Exception ex)
              {
                  ModelState.AddModelError("", ex.ToString());
                  return View();
              }
          }
  </code></pre>