We’re pleased to announce the release of Proper Design’s first WordPress plugin, WP-MP-Contact!
Commissioned by Action for Renewables, the plugin is an add-in for Gravity Forms to allow visitors to send a pre-defined message to their MP. Once the constituent has entered their postcode, the plugin uses two open-source politics APIs to return their MP’s details – name, photo, constituency and email address. The plugin then populates the message to be sent to the MP (set in the WordPress dashboard by the campaign administrator) and allows the constituent to modify the message before sending to their MP.
We think it that it’s turned out pretty nicely!
As with many open source projects, this project builds on the great work done by others. In particular, we’d like to thank:
- They Work for You and The Guardian for providing free public politics APIs. Without these services, the add-in wouldn’t function
- Rubenarakelyan for writing a PHP class to interact with They Work for You
- Travis at WPSmith for providing the basics of custom fields with Gravity Forms
- TheAgency for taking the concept of Gravity Forms custom fields a bit further
- Gravity Forms for their excellent support
- And last but not least, Pippin Williamson for his excellent WordPress AJAX tutorial. We really should have this procedure burned into the back of our brains by now, but we always end up using Pippin’s guide as a reference
And of course we’d like to thank RenewableUK and Action for Renewables for funding the project and supporting the open source ethos of giving back to the developer community. We hope that it’s useful for others.