Mike:
This is an important feature for us, too. It's pretty much a deal-breaker. We can't have users all entering names inconsistently. At least having a dropdown of suggested values would help bring some uniformity to the process.
I'm envisioning things working like this:
- when defining the MetadataType, there is a boolean that indicates "enforce lookup"
- if enforce_lookup is true, the form presents an HTML select field
- if enforce_lookup is false, the form presents a text field, and it uses javascript to retrieve the lookup values as the user types (you could use your technique of a select field and a text field, but that would be a little cumbersome for the user)
Then you could enter the python database code in the lookup field when you define the MetadataType.
I'm very close to trying to tackle this myself. I really like Mayan in comparison to other products, but we really must have this feature (along with a couple of others).