Allow passing form instructions as a list of strings.
This commit is contained in:
parent
af9632519c
commit
63b58edda1
1 changed files with 2 additions and 1 deletions
|
@ -201,7 +201,8 @@ class Form(ElementBase):
|
|||
del self['instructions']
|
||||
if instructions in [None, '']:
|
||||
return
|
||||
instructions = instructions.split('\n')
|
||||
if not isinstance(instructions, list):
|
||||
instructions = instructions.split('\n')
|
||||
for instruction in instructions:
|
||||
inst = ET.Element('{%s}instructions' % self.namespace)
|
||||
inst.text = instruction
|
||||
|
|
Loading…
Reference in a new issue