Bug 40685 - Self-registration defaults to the first library in the list
Summary: Self-registration defaults to the first library in the list
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-21 21:41 UTC by Jason Robb
Modified: 2025-08-21 23:42 UTC (History)
1 user (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Robb 2025-08-21 21:41:30 UTC
Patrons often skip the selection of Home library when self-registering because it is already populated by the first library in the list, leading to an influx of often incorrect new accounts for that library.

If the Home library dropdown were initially blank, the patron would be forced to make a choice.

We currently work around this by adding a blank option to the top of the dropdown with JS:

//Blank library option to force a selection
$('#opac-patron-registration #borrower_branchcode').prepend("<option value=''></option>").val('');

As an aside, blanking the top option then submitting the form without a branchcode leads to a 500 error, so we had to set branchcode as mandatory in PatronSelfRegistrationBorrowerMandatoryField to avoid that issue.
Comment 1 David Cook 2025-08-21 23:42:21 UTC
This is an interesting one for sure. I took a look at some of our examples, and it looks like we use Javascript in a number of cases to do similar things. (Same for category code too actually.)

This would be a good fix for everyone I think.