0

I'm sure what I'm trying to do is possible but frustratingly I just can't get it to work. I have a form setup and working fine which uses category checkboxes and everything works well on the results page. However I have tried adding a similar form which searches different categories originally expecting it to work with the same results page but it doesn't output anything. I have tried giving it a different results page and again nothing is output between the low search results tag. I tried differentiating the searches by giving them different collections but this didn't work either..

Is it possible to have more than one low search form per page in this way?

Here is the form code, with the bottom one working perfectly...

    {exp:low_search:form collection="barristers" search_mode="all" result_page="search-barrister-practice-areas/{segment_2}" query="{segment_3}"}   
                <p class="checkboxes-right">
                    {exp:channel:categories channel="barristers" style="linear" category_group="1" show="1|2|3"}
                        <input type="checkbox" name="category[]" id="{if category_id == "1"}commercial{/if}{if category_id == "2"}eu{/if}{if category_id == "3"}publiclaw{/if}" value="{category_id}"{if category_id IN ({low_search_category})} checked="checked"{/if} /> {category_name}<br/>
                    {/exp:channel:categories}
                </p>
                <input type="submit" value="SUBMIT" class="button" />
                <hr class="dotted" />
{/exp:low_search:form}


                <h3>Seniority</h3>
                <p class="checkboxes-left">
                    <input type="checkbox" name="all" value="All" id="seniorityall" /> All
                </p>

{exp:low_search:form collection="barristers" search_mode="all" result_page="search-barristers/{segment_2}" query="{segment_3}"} 
                <p class="checkboxes-right">
                    {exp:channel:categories channel="barristers" style="linear" category_group="2" show="7|8|9"}
                        <input type="checkbox" name="category[]" id="{if category_id == "7"}qc{/if}{if category_id == "8"}junior{/if}{if category_id == "9"}doortenant{/if}" value="{category_id}"{if category_id IN ({low_search_category})} checked="checked"{/if} /> {category_name}<br/>
                    {/exp:channel:categories}
                </p>
                <input type="submit" value="SUBMIT" class="button" />
                <hr class="dotted" />
{/exp:low_search:form}

I have this test code in the results page for the form which is not outputting anything:

        {exp:low_search:results query="{segment_3}" collection="barristers" orderby="date" sort="desc" status="not closed" disable="member_data"}


            <p><strong> {low_search_category} </strong></p>
            {title}


        {/exp:low_search:results}

I'd be so grateful if someone could help with this...

Thanks,

Alex

5
  • You should definitely be able to have 2 forms on one page, submitting to the same results page. Can you enable the template debugger and copy/paste it here for a search results page that is showing no results?
    – Low
    Commented Jul 16, 2013 at 10:43
  • Hi Low, thanks for your swift response... The template debug code is too long by 8000 characters! Is there another means of posting this or do you have an email? I could send you the page online? Commented Jul 16, 2013 at 11:06
  • Is there anything at all you can see that doesn't look right? I have many pages that have three forms on each and was hoping to use Low for all of them. The log doesn't seem to show any errors - just wish I could post it but it's rather vast! Commented Jul 16, 2013 at 11:17
  • Send me an email: hi at gotolow dot com.
    – Low
    Commented Jul 16, 2013 at 11:19
  • Thankyou very much low - I will post any solution here if it's not something daft - thanks again - email imminent... Commented Jul 16, 2013 at 11:20

1 Answer 1

1

Answering for visibility. Yes, it is totally possible to have multiple forms on one page targeting the same Results page. You do have to make sure, however, that the selected category has entries assigned to it in order for it to return results.

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.