title: How to use remember me in a custom form in Magento
body: <p>I am currently making a custom drop down form in Magento and I am trying to add remember me functionality to it by using the following code in the login form the login form is functional until I add the remember me checkbox</p>
  
  <pre><code>&lt;ul&gt;
       &lt;li id="remember-me-box" class="control"&gt;
          &lt;?php $rememberMeId = 'remember_me' . Mage::helper('core')-&gt;getRandomString(10); ?&gt;
          &lt;div class="input-box"&gt;
              &lt;input type="checkbox" name="persistent_remember_me" class="checkbox" id="&lt;?php echo $rememberMeId; ?&gt;"&lt;?php if ($this-&gt;isRememberMeChecked()): ?&gt; checked="checked"&lt;?php endif; ?&gt; title="&lt;?php echo Mage::helper('core')-&gt;quoteEscape($this-&gt;__('Remember Me')) ?&gt;" /&gt;
          &lt;/div&gt;
          &lt;label for="&lt;?php echo $rememberMeId; ?&gt;"&gt;&lt;?php echo $this-&gt;__('Remember Me') ?&gt;&lt;/label&gt;
      &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>And here is the login form with the remember me checkbox:</p>
  
  <pre><code>&lt;form action="&lt;?php echo $this-&gt;getUrl('customer/account/loginPost') ?&gt;" method="post" &gt;
      &lt;?php echo $this-&gt;getBlockHtml('formkey'); ?&gt;
      &lt;div class="block-content" &gt;
          &lt;input type="text" name="login[username]" id="mini-login" placeholder="&lt;?php echo $this-&gt;__('Email:') ?&gt;" class="input-text"/&gt;
          &lt;input type="password" name="login[password]" id="mini-password" placeholder="&lt;?php echo $this-&gt;__('Password:') ?&gt;" class="input-text"/&gt;
          &lt;div class="actions"&gt;
              &lt;ul&gt;
                  &lt;li id="remember-me-box" class="control"&gt;
                      &lt;?php $rememberMeId = 'remember_me' . Mage::helper('core')-&gt;getRandomString(10); ?&gt;
                      &lt;div class="input-box"&gt;
                          &lt;input type="checkbox" name="persistent_remember_me" class="checkbox" id="&lt;?php echo $rememberMeId; ?&gt;"&lt;?php if ($this-&gt;isRememberMeChecked()): ?&gt; checked="checked"&lt;?php endif; ?&gt; title="&lt;?php echo Mage::helper('core')-&gt;quoteEscape($this-&gt;__('Remember Me')) ?&gt;" /&gt;
                      &lt;/div&gt;
                      &lt;label for="&lt;?php echo $rememberMeId; ?&gt;"&gt;&lt;?php echo $this-&gt;__('Remember Me') ?&gt;&lt;/label&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
              &lt;button type="submit" class="button"&gt;&lt;span&gt;&lt;span&gt;&lt;?php echo $this-&gt;__('Login') ?&gt;&lt;/span&gt;&lt;/span&gt;&lt;/button&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>However, I get this error when I try it out:</p>
  
  <blockquote>
    <p>Exception printing is disabled by default for security reasons.</p>
  </blockquote>
  
  <p>How do I fix this error and create a functional remember me checkbox in a custom Magento form?</p>