in creating a custom setup page using an xml file, how does one go about setting multiple dependencies when using the nullUnlessFieldSet key?
I see in the _helpers.js file the following
widget = element['type'] if 'type' in element else 'textfield'
widgetstyle = ''
depends = element.get('hideUnlessFieldSet')
hidetype = 'hideUnlessFieldSet' if element.has_key('hideUnlessFieldSet') else None
if not hidetype:
hidetype = 'nullUnlessFieldSet' if element.has_key('nullUnlessFieldSet') else None
if hidetype:
depends = element[hidetype]
depends = depends if isinstance(depends, list) else [ depends ]
for depend in depends:
if not form_defaults.get(depend, ''):
if hidetype == 'nullUnlessFieldSet':
widget = 'hidden'
else:
widgetstyle = 'style="display: none"'
there is the type check for list, but I cannot seem to be able to pass in a list
I've tried just listing each dependency on it's own line, this resulted in the last entry being the one that controls if the section is null or not
I've tried using a list syntax ['username','password','host'] this didnt work either as the js file sees the list as a str
any pointers would be nice as it seems anything I pass in becomes a str
thanks