1

Topic: A recording form with drop down for sub groups

I am trying to make a form that has a primary selection of:
Higher Plants, Lower Plants, Fungi, Birds, Mammals, Reptiles, Amphibians, Fish and Invertebrates.  Invertebrates *may* be further split.
Once the group is selected the user can enter the species.  Is there a prebuilt module for this, and is it documented anywhere.

I would also like the autocomplete to work for both common and scientific name, is this possible?

I am also the owner/admin of the warehouse and I guess that the initial species list population is important for both these functions.

2

Re: A recording form with drop down for sub groups

Hi

I haven't seen a form with a hierarchical species selection but I shouldn't think it would be too hard. You would probably just be looking at a little bit of JavaScript (in a JQuery style), modifying the query that the autocomplete executes based upon the primary selection.

You might choose to have a separate species list for each group or use a single species list and filter on the taxon_group field. The latter might lead you in to using non-standard taxon groups though and there may be some advantage in adhering to standard NBN taxon groups (should you be in the UK).

The template for the JavaScript that the autocomplete control executes can be found in the indicia_templates array at the top of the helper_base.php file.

You'd probably want to make the primary selection a custom occurrence attribute so that the value is stored and can be reloaded when editing records. You could maintain a termlist of your higher level groups or perhaps build the list by a query on the names of your taxon lists.

Take a look at autocomplete() and select() in the API documentation

It is certainly possible for autocomplete to work on both common and scientific names. iRecord demonstrates this. It works by virtue of searching the cache_taxon_searchterm table. This even supports an abbreviated 2-3 character lookup on scientific names e.g. haaxy finds harmonia axyridis.

Jim Bacon.

3

Re: A recording form with drop down for sub groups

There may be some code that is useful for this in the select & listbox controls - look for the option parentControlId in the data_entry_helper.php file to find the code which allows select boxes to be linked in a similar fashion to how you describe.

John van Breda
Biodiverse IT

4

Re: A recording form with drop down for sub groups

Thanks John, Jim for your replies.

The iseal solution looks to be beyond what resources permit for the moment, I was hoping that someone would have a pre-build solution in the library.  Anyway.  I have proposed creating an Indicia page for each category, then recorders can input their fish, plant, whatever in there.  For the moment they will have to be limited to either common OR scientific name using one of the pre-build forms.  Not ideal but workable.

Mike Evans