Hi,
I’m new to OOD so forgive me if this is a simple fix…
I’m editing a form which creates a JupyterHub instance on our cluster to allow a user to select additional modules they would like to load into their environment. I am trying to do this using a multiple select box. I can get the multiple select box to show on the form and it does indeed allow multiple selections but when I launch the instance the data does not seem to pass through.
I have the following attribute in my form.yml.erb
:
extra_py374_modules:
widget: select
label: Extra Python 3.7.4 Modules
help: Select additional Python 3.7.4 modules you wish to include
html_options:
multiple: "true"
size: 5
options:
- [ "TensorFlow 2.0.0", "TensorFlow/2.0.0-foss-2019b-Python-3.7.4" ]
- [ "scikit-learn 0.21.3", "scikit-learn/0.21.3-foss-2019b-Python-3.7.4" ]
(the options are actually generated from a text file but I’ve included hard-coded examples to make it simpler)
Now, when I launch the instance I can see in the staged directory within user_defined_context.json
that extra_py374_modules: ""
. I would expect this to be an array of all of my selections. When I remove the html_options
from my attribute (making it a single select rather than multiple select), the context gets a string containing the module I chose e.g. extra_py374_modules: "TensorFlow/2.0.0-foss-2019b-Python-3.7.4"
.
The result of this problem means no extra modules get loaded.
What am I doing wrong?
Kind regards,
James