Forums

IE not validating my form

jrthor2 11 Apr, 2013
I have a form at http://www.zluth.org/golf-benefit which seems to validate in firefox, but in IE (I have IE 9), it is allowing me to submit my form without filling anything in. I have "Enable JS Validation" set to "Yes", and the fields the appropriate fields are marked Required. Could someone help me get this working in IE? Also, I did add the below On Load Event, which I had added on another form I created, which works fine.

<?php
// Force IE9 to run in IE8 emulation mode to avoid JS errors with Mootools 1.2 or later
jimport('joomla.environment.browser');
$browser =& JBrowser::getInstance();
if ( $browser->getBrowser() == 'msie' && $browser->getMajor() == 9 ) {
  $doc =& JFactory::getDocument();
  $doc->setMetaData( 'X-UA-Compatible', 'IE=EmulateIE8', true );
}
?>


I have tried removing the above code, and it still did not validate my form in IE.

Thanks for any help!!
GreyHead 11 Apr, 2013
Hi jrthor2,

I'm not sure - the good news is that it works in IE10 and in IE10 using IE7 browser mode.

Please try removing the <p> tags from around the form HTML - they are technically illegal HTML and sometimes upset IE - though not usually by breaking the validation.

Bob
jrthor2 11 Apr, 2013
That did it. I changed the <p> to <div> and now IE is working.

Thanks,
Jason
This topic is locked and no more replies can be posted.