Open danieltellez opened 3 years ago
Does it work when you just return "multiple"
here?
Does it work when you just
return "multiple"
here?
Yes.
And it also works if I remove element.length === 1
on this line.
Anyone knows why we need this first check ? It is not enough to check if the element has the "multiple" attribute to return "multiple"?
Which is the case when we have "multiple" and the length of the element is "one" that we want to get a single element instead of a list?
This is my code:
I expected to get a list of values on
multiple_field
variable onviews.py
. But it looks like in this context,getForwardStrategy
returns single, so I get only the first value.If I set the default widget for
multiple_field
, the behavior is correct. I've also tried addingField('multiple_field', multiple='')
on the form, but it didn't work either.As a workaround, I'll hide my field with CSS. But, Is it possible to get the correct behaviour with some other configuration?