WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need a way to change the encoding type for my comment form, without hacking the core files.

I'm aware of the function to work on the post editing form: post_edit_form_tag.

I've tried this:


But it doesn't work, the only next step I know of is to hack the source code... Any help would be very much appreciated—thanks in advance!

share|improve this question
How is this not working? Any errors, warnings, strange behavior? The ID is correct? And it is an ID (and not a class)? – tfrommen Mar 11 '13 at 14:58
@t f, It's just not doing anything, I'm using an id and it is correct... – Circle B Mar 11 '13 at 16:50
@One Trick Pony, that worked! thanks for the tip! – Circle B Mar 11 '13 at 16:56
Posting answers as comments just results in cluttered comment threads... – Chip Bennett Mar 12 '13 at 19:36
up vote 1 down vote accepted

One Trick Pony answered the question, here's his solution:

jQuery('#comment_form')[0].encoding = 'multipart/form-data';

And here's a jsFiddle of it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.