Image submit buttons and Movable Type

Do you use Movable Type and want to submit forms using an image? You’ll need to edit your Movable Type installation to work around a 4 year-old bug.

Movable Type is listening for the “post” or “preview” parameter but if you use an image as a submit button these parameters have x and y values corresponding to your mouse click. You need to teach Movable Type how to listen for these different parameters before your comments will work.

Fix it

  1. Open MT/App/ inside of your server’s Movable Type installation.
  2. Search for “So we hack it” to find the commentary around the code in question.
  3. Include post.x and preview.x as valid inputs by copying the code below.
    if ($q->param('post') || $q->param('post.x')) {
        } elsif ($q->param('preview') || $q->param('preview.x')) {

You can now use image submit buttons for your Movable Type comments.