Thank you for your input. I managed to get 1P to save the Ticket Number and Surname fields, but it doesn't seem to recognise that there are no username or password fields. So even though there is a saved entry for the library website it doesn't offer to fill the fields when I go to the website. It thinks it should write the ticket number into username field and the surname into a password field, but there are no such fields on the web page. So I'm still trying things to see if there is a way to make it work.
I think the reason your example works is because you are adding a third field to the username and password fields. But apparently those two fields have to be there. I need a solution for when there are no fields named username or password.