Document using options within a text parameter.

This commit is contained in:
John Chilton
2017-01-09 13:57:57 -05:00
parent 82aea503e1
commit 0f28f8549b
3 changed files with 46 additions and 0 deletions
+14
View File
@@ -1937,6 +1937,20 @@ rendered on the tool form as a text area instead of a single line text box.
<param name="foo" type="text" area="True" size="5x25" />
```
As of 17.01, ``text`` parameters can also supply a static list of preset
defaults options. The user **may** be presented with the option to select one of
these but will be allowed to supply an arbitrary text value.
```xml
<param name="foo" type="text" value="foo 1">
<option value="foo 1">Foo 1 Display</option>
<option value="foo 2">Foo 2 Display</option>
</param>
```
See [param_text_option.xml](https://github.com/galaxyproject/galaxy/blob/dev/test/functional/tools/param_text_option.xml)
for a demonstration of this.
$attribute_list:value,size,area:5
#### ``integer`` and ``float``
@@ -0,0 +1,31 @@
<tool id="param_text_option" name="param_text_option" version="1.0.0">
<command>
echo "$text_param" > $out_file1;
</command>
<inputs>
<param name="text_param" type="text" value="foo 1">
<option value="foo 1">Foo 1</option>
<option value="foo 2">Foo 2</option>
</param>
</inputs>
<outputs>
<data name="out_file1" format="txt" />
</outputs>
<tests>
<test>
<output name="out_file1">
<assert_contents>
<has_line line="foo 1" />
</assert_contents>
</output>
</test>
<test>
<param name="text_param" value="foo 3" />
<output name="out_file1">
<assert_contents>
<has_line line="foo 3" />
</assert_contents>
</output>
</test>
</tests>
</tool>
@@ -62,6 +62,7 @@
<tool file="multi_data_repeat.xml" />
<tool file="multi_data_optional.xml" />
<tool file="paths_as_file.xml" />
<tool file="param_text_option.xml" />
<tool file="column_param.xml" />
<tool file="column_multi_param.xml" />
<tool file="special_params.xml" />