guardian/frontend — pull request #2603 by marchibbins (2013-12-19 12:44:15+00:00)
Title: Ethical awards and Formstack

### Formstack
So this baby introduces [Formstack](https://www.formstack.com/) integration into Identity. Formstack is an online form builder-editor-WYSIWYG drag-and-drop wonder, allowing non-developers to build, publish and embed forms. Formstack handles all the data and file storage, so we can create and dispose of forms with no database work as and when we please, also has a bunch of moderation and report tools etc.

### Ethical awards
The Observer Ethical Awards ([2013 link](http://www.theguardian.com/observer-ethical-awards?view=desktop)) provide our first opportunity to use a third-party form implementation. [Last year's forms weren't pretty](http://staging.easyanswer.net/ethicalawards/ContactDetails.aspx) and required the user to manually (re-) enter information which we already have access to in Identity. This year, a similar microsite will be built and each award category will link directly to an Identity page which renders the corresponding Formstack-built form, now styled to look like a native Guardian form, additionally injecting some data from our cookie.

#### This pull request
We've built a generic Formstack controller which will verify whether a supplied ID corresponds to a form that we've built, if so the template will render Formstack's embed code. Their javascript implementation isn't great, requires jQuery and contains plenty of `document.write` ([view source here](:https://www.formstack.com/forms/js.php?1645481-tOfqZ3Kxj2), if you dare), so this page will be loaded in an iframe by whatever container requries it. Right now, those are our Ethical Awards specific pages, in the future this could be an article page. This way their scripts won't pollute our pages and by rendering it on an Identity page (rather than iframe to their site directly) we have access to the cookie.

Our javascript module does a few things, though essentially removes their CSS links, decorates their HTML (which cannot be templated) with our classes and uses `postMessage` to the container to update it's state and dimensions. Some of this isn't pretty given that we can't work with their attempt at javascript, which doesn't expose events that we can pick up on, or is even intended to be modified or extended in any way.

Current list of URLs:
* Retailer of the year: https://profile.thegulocal.com/ethical-awards/1645439-tOfqZ3Kxj2
* Campaigner of the year: https://profile.thegulocal.com/ethical-awards/1645466-Tu4y4EFX8s
* Local hero: https://profile.thegulocal.com/ethical-awards/1645469-Tu4y4EFX8s
* Arts & culture: https://profile.thegulocal.com/ethical-awards/1645481-tOfqZ3Kxj2
* Sustainable fashion: https://profile.thegulocal.com/ethical-awards/1645532-tOfqZ3Kxj2
* Travel: https://profile.thegulocal.com/ethical-awards/1645527-Tu4y4EFX8s
* The Great OEA Energy Race: https://profile.thegulocal.com/ethical-awards/1645537-tOfqZ3Kxj2
* Young Green Champions: https://profile.thegulocal.com/ethical-awards/1645561-tOfqZ3Kxj2
* The Community Energy Project Award: https://profile.thegulocal.com/ethical-awards/1645606-tOfqZ3Kxj2
* Best in business: https://profile.thegulocal.com/ethical-awards/1645615-tOfqZ3Kxj2

Additionally, all of this is behind a switch.