setting a default value where no value from a non-mandatory lookup field has not been supplied

setting a default value where no value from a non-mandatory lookup field has not been supplied

Hi,

I have a client name field and and client number field with a dynamic lookup field for client number so that if the client types their name in (accurately) only their client number will appear on the drop down list.

However, for situations where the client does not have a number (e.g. new client) or types their name in incorrectly, I would like a default client number (say 1234) to be entered automatically. Ideally I would like clients to be able to select this from the dropdown list, but I can't find a way to add a default value for a lookup field. So I would be perfectly happy if it just got saved in the database e.g. if the client submits the form without selecting a client number, the client number field is set with the default value - how would I go about doing this?

Many thanks for any advice.