See the Mailing Lists Page for how to subscribe and unsubscribe.
eprints_tech messages
Please note: this page shows emails that have been sent to the eprints_tech mailing list. Some of these may be spam emails we have failed to filter.
Re: [EP-tech] limiting possible values of a field to those in lookup table
From: Tim Brody <tdb01r AT ecs.soton.ac.uk>
Date: Fri, 16 May 2008 07:18:44 +0100
| Threading: | ↑ [EP-tech] limiting possible values of a field to those in lookup table from david.lewis AT utc.fr • This Message |
*** http://www.eprints.org/tech.php/id/%3C482D2744.90302%40ecs.soton.ac.uk%3E *** EPrints community wiki - http://wiki.eprints.org/ David Lewis wrote: > *** http://www.eprints.org/tech.php/id/%3C48234100.60703%40utc.fr%3E > *** EPrints community wiki - http://wiki.eprints.org/ > > Hi, > > I'm wondering what's the best way to implement a "constrained > keywords" field in EP3.0 > > I'm autocompleting on user input as follows: > > <field ref="utc_keywords_rameau" > input_lookup_url="{$config{perl_url}}/users/lookup/simple_sql" > ↵ input_lookup_params="table=utc_keywords_rameau&mode=prefix"/> > > However, I want to prevent users from entering anything OTHER than > values proposed in the lookup table .. i.e. force them to choose from > a finite list of accepted values. > > Anybody else been faced with this problem and found a neat way around it? How large are the number of predefined keywords? You could use a NamedSet (i.e. a "select" box). Or you could enforce something during validation. Without implementing your own bits of javascript you can't have a text field that only allows certain words. All the best, Tim.
[index] [prev] [next] [options] [help]




