title: Add suffix to form field
body: <p>I have some (more than thousand) users that insist on logging in just with their names, but a system that insists on having the full e-mail address (name + @my-mail.com) provided. Which is a smart solution to add a suffix to a field without bothering the user?</p>
  
  <p>The Form:</p>
  
  <pre><code>&lt;form id="login_form" action="processing.php" method="post" class="form"&gt;
    &lt;fieldset&gt;
       &lt;ul class="input_block"&gt;
          &lt;li&gt;
             &lt;input type="text" name="email" id="email" value="" /&gt;
          &lt;/li&gt;
          &lt;li&gt;
             &lt;input type="password" name="passwort" id="password" /&gt;
          &lt;/li&gt;
       &lt;/ul&gt;
    &lt;/fieldset&gt;
  </code></pre>
  
  <p></p>
  
  <p>I played around with the key up function for the field, but it didn't help much. </p>
  
  <pre><code>&lt;script&gt;
  $('#email').keyup(function(e){
     if(this.value.length &gt; 12){
       this.value = this.value + '@my-mail.com';
    if( this.value.indexOf('@my-mail.com') &lt;= 0 ){ 
       this.value = String.fromCharCode(e.which) + '@my-mail.com'; 
    }
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>I consider a solution that manipulates the field just right before the submission much more "proper" (sadly I don't have access to the PHP file that is receiving the submission). So I tried as well with the submit function, this didn't work either.</p>
  
  <pre><code>&lt;script&gt;
  $( "#login_form" ).submit(function( event ) {
     ("#email").value = ("#email").value + '@my-mail.com';
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>Anybody some advise on how to solve it using the submit function or another idea that seems to be better?</p>