Add a Koha login form to your web site


This question came up on the Koha mailing list today: How can I add a Koha login form to my library’s web site? Luckily it’s really simple. The image here is of the one we added one to our site.

Everything you need to know about how to do it is right on your Koha OPAC home page. Just view the source for the login box and copy it! Here’s the simple version, adapted right from the source:

[sourcecode language=”html”]


The only thing you’d need to change to make that snippet work for you is the part. Replace that with the full URL of your Koha OPAC, e.g.

You could even do the same for the staff client, for instance if you wanted your users to be able to log into the Koha staff client from your library’s intranet:

[sourcecode language=”html”]


Of course I wouldn’t recommend putting a login form for your staff client anywhere in public view. Note that using that form will log you in to your default library. If you wanted to give your users the option of logging into a different library you’d have to reproduce the full <select> tag from your staff client’s login page.  View the source to find it.

4 thoughts on “Add a Koha login form to your web site

  1. Pablo

    Excellent post! What I wish to know if is very difficult to unify the login of Koha with other software, in my case por example with this one, Brushtail:
    Perhaps a possibility is to extract part of code of that project and add it like a plugin to Koha….?
    Other thing: Your link to Koha 3 Manual is deprecated, now it is on (now with Drupal CMS!).

  2. oleonard Post author

    Your question is far beyond the scope of this blog, and I don’t know enough about Koha (or Brushtail) authentication to advise you about the issue. It would be something you could bring up on the Koha mailing list.

    I followed the link to the Brushtail software, and I notice they say it’s open source but don’t provide a download link. The definition of “Open Source” on their site neglects to mention that open source software is freely distributable. That raises serious questions about their real commitment to open source, not to mention their general ethics.

    Lastly: thanks for the reminder about my Koha manual link. And by the way, it’s not Drupal, it’s Plone 🙂

    1. oleonard Post author

      Although this is an old post, the basic principles should still apply. Make sure you’re copying the markup from the source of your OPAC, not from the examples in this post. And be sure to update the form’s “action” attribute with the correct URL for your catalog.


Leave a Reply

Your email address will not be published.