chillu/silverstripe-recaptcha — Issue #3: Problems with IE9
Author: anselmdk
Created: 2012-01-26 19:28:09+00:00
State: open

We're having the problem on a live site, that sites just won't submit in IE9.
Several threads are pointing to that IE9 and reCaptcha just won't work together, and this thread suggests to force Internet Explorer in IE8 mode:
http://answers.microsoft.com/en-us/ie/forum/ie9-windows_7/ie9-is-not-capturing-recaptcha-form-fields/6479d1f0-6f67-e011-8dfc-68b599b31bf5?msgId=44883943-036d-e011-8dfc-68b599b31bf5&page=1

So, what we're doing for now, is to force all `UserDefineForms` pages to be rendered in IE8 mode like described below (off course that can be extended to include other page types as well). I don't think this is optimal (as many sites look much better in IE9/10 than in IE8), but this seems like a good trade-off, considering that users are at least able to submit forms.

Does anyone else experience this problem, or does anyone else have a better solution?

```php
/*
* Forcing the browser to render in IE8 mode for UserDefineForms
* This is due to problems with IE9 and reCaptcha
*/
public function ForceIE8(){
$class = $this->ClassName;
if ($class == 'UserDefinedForm') {
return true;
}
}
```
...and adding this as first in the head tag

```html
<% if ForceIE8 %>

<% end_if %>
```