The "Need more choices" option doesn't work that well when you create a poll. I would guess that the behaviour should be as in 4.7.

These things seems odd to me (and differs from 4.7) :
* If the poll doesn't validate (e.g empty title), no extra choises are createt after pressing preview.
* The "Need more choices" checkbox is still checked after a preview.
* It's impossible to have more than 10 choices.
* If you uncheck the "Need more choices" checkbox, only 5 choises are rendered after a preview, even if you have filled in more than five.

CommentFileSizeAuthor
#2 poll-fix_0.patch925 byteseaton
#1 poll-fix.patch539 byteseaton
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

eaton’s picture

Status: Active » Needs review
FileSize
539 bytes

1) Additional choices only show up when no validation errors are present. This is a side effect of the way the new FormAPI system works -- it doesn't build 'updated' versions of a form until the validation errors are gone, and I think this is a relatively minor issue. It wouldn't be able to submit in that state anyhow.

2) Looking into it.

3) Fixed.

4) Fixed.

eaton’s picture

FileSize
925 bytes

...Aaaand the selection of the 'need more choices' checkbox is fixed as well.

chx’s picture

Status: Needs review » Reviewed & tested by the community

The first default_value is a remnant of an ancient age when we needed to trick with form_builder to do multistep. The second is fixing ("noooo, input elements can't have a value!") went berserk. This input element never appears as checked hence the #value => 0.

anders.fajerson’s picture

#1 is definitely a minor issue. This patch works great.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to the trunk. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)