Hello again,
I did a couple tests and it looks like maybe the behavior with force_select="true" is inconsistent, sometimes you will get a validation error and sometimes not depending on how the options are built. For the example I stated in the previous email my apologies I was wrong this setup works and automatically produces a first option showing "None" in the drop down menu and if you hit execute it will raise a red validation error that you cannot pick None. But if I have my options coming from a file:
<param name="organism" type="select" force_select="true" label="Organism">
<options from_file="organisms.txt">
<column name="name" index="1"/>
<column name="value" index="0"/>
</options>
</param>
Where in the file organisms.txt I have a tab separated blank first entry line then the drop down menu will produce a first blank option (without "None" just blank) but it will not throw a validation error unlike the first example. This maybe should have the same behavior as the first example.
best,
Leandro
Happy holidays,
Apologies for a simple question, I cannot find seem to find an answer looking through the docs and Galaxy tool xml files in the distro.
Is there a way to have a select menu where I don't want there to be a default selection (when the form loads it is empty) yet the user must pick something otherwise one of those nice validator red message comes up telling you to pick something? For example:
<param name="organism" type="select" force_select="true" label="Organism">
<option></option>
<option value="Homo_sapiens">Homo sapiens</option>
<option value="Mus_musculus">Mus musculus</option>
<option value="Rattus_norvegicus">Rattus norvegicus</option>
</param>
If I use the validator type="empty_field" or "no_options" it doesn't work, the user can hit execute with an empty select and it tries to execute.
best,
Leandro