This is a really strange issue that I cannot seem to solve. I have several forms (login, registration, and other) outputted on a site via short codes. When the forms are submitted, their data is processed via an "init" hook that listens for the $_POST data.

When the forms are submitted in IE 9, all fields are cleared of the values when clicking submit. For example, let's say there is an input field with a name of "username", and the field's value is set to "johndoe"; when submitting the form through any browser besides IE 9 (include 7 and 8), the data comes in like this:

$_POST['username'] = 'johndoe'

Exactly as expected.

However, when the form is submitted with IE9, it comes out like this:

$_POST['username'] = ''

As far as I can tell, it happens with every form on the site.

The custom login form I've built, for example, looks like this:

<form id="re_login_form" class="re_login_form" action="" method="post">
            <label for="re_user_Login"><?php _e('Username', 're'); ?></label>
            <input name="re_user_login" id="re_user_login" class="required" type="text" title="<?php _e('Username', 're'); ?>"/>
            <label for="re_user_pass"><?php _e('Password', 're'); ?></label>
            <input name="re_user_pass" id="re_user_pass" class="password required" type="password"/>
    <fieldset class="form-action">
            <input type="hidden" name="refalf_redirect" value="<?php echo $redirect; ?>"/>
            <input type="hidden" name="re_login_nonce" value="<?php echo wp_create_nonce('re-login-nonce'); ?>"/>
            <input id="re_login_submit" type="submit" class="button re_submit" value="<?php _e('Log In', 're'); ?>"/>
            <p class="forgot-password"><a href="<?php echo wp_lostpassword_url( get_permalink() ); ?>" title="<?php _e('Lost Password', 're'); ?>"><?php _e('Lost Password?', 're'); ?></a></p>

One of the things that is extra interesting is that the fields are visibly cleared of their values when clicking submit in IE9. It's also as though the submit button is triggering something in IE9 that clears the fields.

Anyone have any ideas?

2 Answers 2


Its most likely a problem with your internet explorer 9
or to be specific addons you installed on it...

Try removing addons from internet explorer and tried again. found some talk that divx / xvid addons might do that for some reason

Additional Reading:

  1. Internet Explorer 9 - Problem with forms and page scripts
  2. Problem with buttons in web pages using after installing IE9

Also in this conversation someone stated that a button with a name attribute
might cause the button to unload variables attached to the form.

Hope this helps... Removing addons helped me ;)
Cheers, Sagive.

  • Unfortunately, none of those worked. I have discovered something else interesting. All input types go blank on submit EXCEPT type="password"; those keep their values.
    – Pippin
    Apr 3, 2012 at 14:17
  • thats weirds... would run another search for similer issuse.. ps. can you add the shortcode to your original question ?
    – Sagive
    Apr 3, 2012 at 15:42
  • I think I've actually narrowed it down. I was able to confirm that it had nothing to do with the PHP, but instead is definitely caused by the values of the inputs getting wiped out upon submit. What is interesting is that fields with predefined values do NOT get wiped out and work fine. I'm testing now with adding placeholders to all fields, which, strangely, seems to solve it. I'll confirm in a few minutes.
    – Pippin
    Apr 3, 2012 at 16:20
  • cool... so you only need to add some predefined values and you'r in the clear.. let me know if i can assist you any further ;)
    – Sagive
    Apr 3, 2012 at 16:27

It is confirmed. Adding placeholders to each of the inputs that did not have a predefined value solved the problem. I'm not completely sure, but I believe this worked because of hte combination with modernizer.js.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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