I have a search from on every page of my site which is working fine, however on my news pages I have ucomment installed. On the pages that have the ucomment form my search form will not work. If you click the search button it just moves the focus onto the first field of the ucomment form as if they are all one.
I have viewed the code and the two forms are not in the same <form> tag. If i remove the ucomment form code then the search starts working again. the ucomment form is added to the template using
Ucomment breaking my search form
Hi,
I have a search from on every page of my site which is working fine, however on my news pages I have ucomment installed. On the pages that have the ucomment form my search form will not work. If you click the search button it just moves the focus onto the first field of the ucomment form as if they are all one.
I have viewed the code and the two forms are not in the same <form> tag. If i remove the ucomment form code then the search starts working again. the ucomment form is added to the template using
<umbraco:Macro Alias="UCommentListComments" runat="server"></umbraco:Macro>
<form id="ucomment" action="./" method="post" >
<h3>Enter Comment</h3>
<umbraco:Macro Alias="UCommentForm" runat="server"></umbraco:Macro>
</form>
and the search form is added via a macro which contains
<form action="/search/" method="GET">
<fieldset>
..........
</fieldset>
<input type="submit" value="Search now..." class="search_submit" />
</form>
Does anyone know why these two are clashing?
Thanks
Rachael
HI Rachael,
Is there anything else going on in the page? e.g. JavaScript form validation - anything that might be expecting all form fields to be filled out?
(Just a long shot)
Cheers, Lee.
Ah yes, the ucomment validation seems to validate all the forms not just the ucomment one.
will fix the js to just look at the one form!
Thank you!
is working on a reply...