1

Topic: Default Species = unknown

It's possible my users won't know the species that they are submitting however the species field is required. The idea is that the record & photo will be reviewed by an expert and then assigned a species.

I've added "unknown" to my species list in the warehouse. This has an id of 523860.

How can I get the species field to default to "unknown"? I've tried editing the form in Dupal via the Form Structure field by adding:

[species]
@default=523860

The control type is set to "autocomplete"

Is this the correct approach?

It seems to work when the control type is "select" but not "autocomplete"

2

Re: Default Species = unknown

Hi

Looks like you have it nearly right. I haven't tried this but I have just eye-balled the code and comments for data_entry_helper::autocomplete and have a suggestion.

The autocomplete control consist of two parts, a text box containing the species name and a hidden input containing the taxa_taxon_list_id (compared with a select which is a single control).

@default sets a value for the hidden input. There is a second option, @defaultCaption, which sets a value for the textbox. You would need to use both, i.e.

[species]
@default=523860
@defaultCaption=unknown

Let us know if that works for you.

Jim Bacon

3

Re: Default Species = unknown

Excellent. Works great. Thanks.

4

Re: Default Species = unknown

For info, I have had discussions recently about an input control which would allow more freedom when entering species, suggesting names from a list but allowing the recorder to use a name that is not listed or, indeed, to leave the species blank if they have no idea. That should be possible using the determinations table in Indicia which can replace the use of the occurrence:taxa_taxon_list_id for recording species identification. It allows a lot more vagueness and an iterative approach to reaching a final value but is not much used at present.

I don't know if that will come to anything.

It is called in to question a little bit by an even more recent discussion about tracking changes during the verification progress with which it may be incompatible.

Jim Bacon