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). On Friday, April 5, 2013 9:05:24 PM UTC-4, Mike Hadmack wrote: > > Hi Lau, > > I don't know that any JS would be required for this feature. I don't > think it would be difficult for the Mayan backend to query the database for > a list of all metadata values and fill in a combo box. In the case of a > static set of metadata values this could be done by a function called from > the "Lookup" property of the metadata type. I think that the only > complication is the addition of a text field beside the combo box that > would allow for entry of new values. This doesn't sound particularly > complex but will require someone with much more Django knowledge than I. > > -Mike > > On Friday, April 5, 2013 5:21:43 AM UTC-10, Lau Llobet wrote: >> >> Hi Mike, I find this feature usefull. Although web browsers tend to place >> already used values to the textboxes while writing. >> >> This solution solves the problems derived from having large lists of >> metadata, together with the solution proposed on the "metadata fixed values >> subsets to avoid long lists" e-mail It would make the metadata description >> more easy. >> >> Both solutions require Java Script in the same web page in order to >> display this features. We could consider contacting a developer in order to >> do this client side coding (JS) while Mayan developers should do the server >> side. They also shoud check if the Puerto Rico laws about accesibility >> allow this features for disabled people usage. Maybe there's a flag on the >> web browser of the disabled person that can trigger the classic web view >> that's currently implemented. >> >> Hope to hear from you, >> >> Lau >> >> >> On Sun, Mar 31, 2013 at 10:15 AM, Mike Hadmack <[email protected]> wrote: >> >>> Hi Everyone, >>> >>> Is there a way to allow a metadata field accept the entry of a new >>> string value AND present the user with a list of existing values from the >>> database. Since the metadata Lookup can execute python code it should be >>> possible to generate a list of existing values as choices, but then I need >>> to allow the user to add new choices to the list. I am pretty new to >>> Django so I don't know how much work would be involved in implementing this >>> feature. Can this all be accomplished by modifying DocumentCreateWizard? >>> >>> Thanks, >>> Mike >>> >>> -- >>> >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "Mayan EDMS" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >> >> -- --- You received this message because you are subscribed to the Google Groups "Mayan EDMS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
