title: Triggering password autofill for dynamic popover HTML form
body: <p>Let's say I have an HTML form to allow a user to sign in to a web site. The form is not statically visible, but shown on-demand via a <a href="http://twitter.github.com/bootstrap/javascript.html#popovers" rel="nofollow">Bootstrap Popover</a>.</p>
  
  <p>This works as intended except for one tiny detail: The browser's password manager does not offer auto-completion of credentials in this form (most probably because it is not visible at the time the page is initially rendered).</p>
  
  <p>Adding <code>autocomplete="on"</code> to the form and the input elements did not change anything.</p>
  
  <p>Is there any way to trigger the form completion again after the login form has become visible?</p>
  
  <p>The form looks like this:</p>
  
  <pre><code>&lt;div id="login_popover_content"&gt;
    &lt;form accept-charset="UTF-8" action="/users/sign_in" autocomplete="on" class="form-horizontal" id="new_user_popover" method="post"&gt;&lt;div style="margin:0;padding:0;display:inline"&gt;&lt;input name="utf8" type="hidden" value="✓"&gt;&lt;input name="authenticity_token" type="hidden" value="..."&gt;&lt;/div&gt;
    &lt;fieldset&gt;
      &lt;div class="control-group"&gt;
        &lt;label class="control-label" for="user_login"&gt;User&lt;/label&gt;
  
        &lt;div class="controls"&gt;
          &lt;input autocomplete="on" class="input-medium" id="user_login" name="user[login]" size="30" type="text"&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="control-group"&gt;
        &lt;label class="control-label" for="user_password"&gt;Password&lt;/label&gt;
  
        &lt;div class="controls"&gt;
          &lt;input class="input-medium" id="user_password" name="user[password]" size="30" type="password"&gt;
          &lt;span class="help-block"&gt;&lt;a href="/users/password/new"&gt;Forgot your password?&lt;/a&gt;&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="control-group"&gt;
        &lt;div class="controls pull-right"&gt;
          &lt;input class="btn btn-warning pull-right" name="commit" type="submit" value="Login"&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/fieldset&gt;
    &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The popover is shown using:</p>
  
  <pre><code>$(anchor).popover(
    content: $(content).html()
    placement: 'bottom'
    html: true
    trigger: 'click'
    template: '&lt;div class="popover headless"&gt;&lt;div class="arrow"&gt;&lt;/div&gt;&lt;div class="popover-inner"&gt;&lt;div class="popover-content"&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;'
  )
  </code></pre>