EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #01244
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Field description/validation based on eprint type
- To: eprints-tech@ecs.soton.ac.uk
- Subject: [EP-tech] Field description/validation based on eprint type
- From: Jan Ploski <jpl@plosquare.com>
- Date: Sat, 27 Oct 2012 16:35:10 +0200
Hi,Is it possible to set the online help displayed for a field and the field validation routine based on the eprint type?
My use case is a field "publication" which has the general meaning "where the item was published". However, the more specific meaning, validation and user instructions should depend on the actual item type. For example, we only wish to allow selection from a predefined list of journals, on the other hand the user is free to enter whatever they want for conference items. As far as search is concerned, the entered value is really a single field.
What I have found so far:1. It's possible to control some field properties (e.g. "required") and hide/show fields by modifying the workflow definition (default.xml). 2. NO reference to eprint is accessible anywhere in field_validate.pl (it's a huge pain, as this is exactly the step where I need it - validating in eprint_validate.pl seems too late for ergonomic reasons). 3. EPC expressions in phrases.xml don't seem to be useful at all (e.g. $item evaluates to "FALSE" rather than the eprint). 4. It seems impossible to have a field that is to be displayed in form only, but not stored in database. I know there is property is_virtual, but it is attached to field type rather than to a field instance, as I would desire; subclassing Text.pm or other field types just for this purpose seems like an overkill.
All these remarks are based on EPrints 3.0.5; I would be also interested if newer versions are any better.
So far I'm using artificial new fields (along with useless database fields for each) to achieve what I want, but it seems like such a kludge...
Regards, Jan Ploski
- Prev by Date: [EP-tech] Re: EP3.3.10 - links to config files in Admin section have _action_delete=1 appended to them
- Next by Date: [EP-tech] Re: eprints on bluehost.com
- Previous by thread: [EP-tech] doi import failed
- Next by thread: [EP-tech] Thumbnails - documentation
- Index(es):