This plugin hasn’t been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.



Tested on Gravity Forms 1.8.19, will probably work under versions from 1.6.

WP-MP-Contact is a Gravity Forms add-in for UK Member of Parliament email campaigns. Using API calls to They Work for You, a campaigning organisation can add an ‘MP-Contact’ field to their gravity form which allows pre-population of an (editable) message to send to an MP.

Unfortunately, the Guardian has decomissioned their politics API that allowed for this plugin to return an MP’s email address without any further input from the administrator. This plugin now uses a Google Spreadsheet as the data source for email addresses. These can either be purchased from DeHavilland, or entered manually from The lookup still uses the Guardian’s format of constituency names, so the data in the Google Spreadsheet is looked up from the Guardian Constituency in column A. An example spreadsheet is available at

On the front-end, the user enters their UK postcode. If the postcode is valid, WP-MP-Contact will show a slide-down drawer with the MP’s details and a pre-populated message from the campaigning organisation (set by the administrator in Gravity Forms settings).

The user has the ability to edit the message that the campaigner has pre-populated before sending an email to the MP.

In the Gravity Forms back end, all submissions are recorded in the usual Gravity Forms entries interface.

MP-Contact comes with minimal styling out of the box and doesn’t pre-suppose how it will look in your theme. Go on, get stuck into styling it, it’s only a bit of flexbox.

Feel free to contribute to the project. You can find the repo on Github at

WP-MP-Contact was developed by Proper Design (


  • Renewable UK ( and Action for Renewables ( for funding the initial development of this Gravity Forms add-in
  • They Work for You’s consituency API (
  • rubenarakelyan’s PHP class for They Work for You (
  • WPSmith for the tutorial that got it all started (
  • The Agency for showing how to work with complex fields (
  • Pippin Williamson for the usual and oft-forgotten explanation of the proper way to do AJAX in WordPress (


1.0 – Initial Release
1.0.2 – Changes handling of Guardian API calls to CURL
1.0.3 – Adds prepend and append to the MP message
1.1 – Moves email source to Google Docs

Contributors & Developers

This is open source software. The following people have contributed to this plugin.


Browse the code