I have two forms on my website, a email sign up box, and a search box (both on the side bar.) I have a problem where if someone tries to press enter on the search box to preform a search of the site, it always opens up the email sign up form. In other words, the site search form will don’t open.
I can’t figure out how to fix this, any ideas?
Here’s the code I’m using in the text widget to get the form to show up.
<div class="signupForm"><form action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=noahsdad', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true">
<p>
<input type="text" name="email" onblur="if (this.value == '') {this.value = 'Enter your email address';}" onfocus="if (this.value == 'Enter your email address') {this.value = '';}" value="Enter your email address"/>
</p>
<input type="hidden" value="noahsdad" name="uri"/><input type="hidden" name="loc" value="en_US"/>
<input type="submit" value="Subscribe" /></div>
You need an
</form>tag for the first<form>element on your page (line 506). The problem is caused because the two forms are seen as one, and hitting “enter” causes them both to submit.If you split them up, each will be a different form, and then hitting “enter” will only submit the one the user is currently on.