There are many places in Koha where values can be chosen via a drop-down menu listing a particular authorised value. For example SUGGEST_FORMAT is used to populate the list of formats that can be selected when placing a purchase suggestion. Currently these lists appear in alphabetical order by description or OPAC description (depending on context), and the first option in the list is usually auto-selected (i.e. more or less default behaviour for a vanilla HTML <select> element). This is problematic in many circumstances as users will accidentally 'select' the first alphabetical option if they don't change anything. There should be a setting in Authorised Values to set between zero and one values per category to be the default value (probably in authorised_values.pl?op=add_form). This would then add a 'selected' attribute to the <option> tag wherever the authorised value list appears as a dropdown menu.
(In reply to Hugh Rundle from comment #0) > There are many places in Koha where values can be chosen via a drop-down > menu listing a particular authorised value. For example SUGGEST_FORMAT is > used to populate the list of formats that can be selected when placing a > purchase suggestion. Currently these lists appear in alphabetical order by > description or OPAC description (depending on context), and the first option > in the list is usually auto-selected (i.e. more or less default behaviour > for a vanilla HTML <select> element). This is problematic in many > circumstances as users will accidentally 'select' the first alphabetical > option if they don't change anything. Good observation. > There should be a setting in Authorised Values to set between zero and one > values per category to be the default value (probably in > authorised_values.pl?op=add_form). This would then add a 'selected' > attribute to the <option> tag wherever the authorised value list appears as > a dropdown menu. Not sure if we should address it like that. You might have two columns using one AV category where one column may be NULL and the other one not. "This would add a selected attribute" => That might be a lot of work checking all templates.. Probably address the most striking cases first?
About the select. Found this on stackoverflow: <select> <option style="display:none;"></option> <option>Option 1</option> [etc] OR <select class="first-opt-hidden"> <option></option> <option>Option 1</option> [etc] WITH css: select.first-opt-hidden option:first-of-type { display:none; }
The select option might work, but coding could get lost at upgrade stage, so I think it would be better to have the option to set a default value.