[Koha] Advanced catalog search widget and course reserves follow-up

Katrin Fischer katrin.fischer.83 at web.de
Sun Oct 28 00:02:58 NZDT 2018


Hi Joelle,

there is an example for a simple form in the manual too which seems to 
match the one you linked to:

https://koha-community.org/manual/18.05/en/html/extending_koha.html#koha-search-on-your-site

It would be nice to update that section to have more and advanced examples.

In order to add more search fields, you could do something like this 
(works for testing if you copy it into opacmainuserblock or similar):

<form name="searchform" method="get" 
action="/cgi-bin/koha/opac-search.pl" id="searchform">
<select name="idx" id="masthead_search">
<option value="kw">Keyword</option>
<option value="ti">Title</option>
<option value="au">Author</option>
<option value="su">Subject</option>
<option value="nb">ISBN</option>
<option value="se">Series</option>
<option value="callnum">Call Number</option>
<input name="q" type="text">
</select>
<br>
<select name="idx" id="masthead_search">
<option value="kw">Keyword</option>
<option value="ti">Title</option>
<option value="au">Author</option>
<option value="su">Subject</option>
<option value="nb">ISBN</option>
<option value="se">Series</option>
<option value="callnum">Call Number</option>
<input name="q" type="text">
</select>
<br>
<input value="Search" id="searchsubmit" type="submit">
</form>

If you let us know where you are stuck or what more options you want to 
add, we might be able to help.

Katrin


On 21.09.18 16:16, Joelle Hannert wrote:
> Does anyone have an advanced search widget for the OPAC that you'd be
> willing to share? I found this basic search widget
> <https://bywatersolutions.com/news/embedable-koha-search-form>, but I'm
> trying to set up a search with multiple search fields and don't have enough
> (or any) programming skill to pull it off from scratch.
>
> As a follow-up to my course reserves widget question a few weeks back, I
> found out that because of the way Koha's course reserves are set up
> (relying on filtering rather than searching), a widget doesn't work for
> this search. My solution has been to embed the page in an iframe - we also
> needed to allow URL access for the iframe within our catalog setup.
>


More information about the Koha mailing list