title: Symfony2 prevent multiple form submission
body: <p>I'm working on a a form with Symfony2. I have some entity fields and a csrf token that is correctly rendered thanks to <code>{{ form_rest(myform) }}</code>.</p>
  
  <p>The problem is :</p>
  
  <ol>
  <li>User fills the form and clicks on the submit button (form is then posted)</li>
  <li>User quickly press the escape key</li>
  <li>User clicks again on the submit button (form is posted again)</li>
  </ol>
  
  <p>Result: an entity (form is binded to an entity) is inserted twice in the database</p>
  
  <p>And that can occur infinitely</p>
  
  <p>I thought that with the CSRF token field, it would prevent this situation but that's not the case. So is there any way to figure it out natively with Symfony framework?
  If not what possibilities exist?</p>
  
  <p>Thank you in advance!</p>