First it only shows 1 choice.
I click "More choices" and get 1 more.
I fill in the two fields, click "More choices" again, and both fields disappear.
I click "More choices" again and I get 2 empty fields.
I'm never able to get any more fields than that.

There's obviously something wrong with the AJAX callback.

CommentFileSizeAuthor
#7 choice_fix-860254-7.patch1.12 KBbryan kennedy

Comments

mario_prkos’s picture

You have to fill choice to proceed to next one. Only when you fill the choice you can add another one. I know it is a little confusing, because there is no point to have empty many empty choices. Maybe we should to make it more clear or make better documentation or do it another way.
Thanks for feedback

doktordrog’s picture

Same too me. If i use 1,2,3,4,5... for choiche the problem occurs. If i use 11111,22222,33333.. it is ok.

ximo’s picture

Yea, it's only when using one number. I was testing with 1, 2, 3, 4, etc. too.

rutan’s picture

I have the same problem. If I use just one number and want more than two fields it "resets" when I try to add more fields.
It works fine with several letters and numbers but crashes if I only use one number. Any solutions?

bryan kennedy’s picture

I can confirm that this bug is present with any single character entires, not just numbers. If you have a single character response then the "more choices" button does not work.

bryan kennedy’s picture

The more choices button also doesn't work at all if you have javascript turned off. The error:

warning: strlen() expects parameter 1 to be string, array given in /path to site/sites/all/modules/pollfield/pollfield.module on line 1452.

is returned.

bryan kennedy’s picture

Version: 6.x-1.12-beta1 » 6.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new1.12 KB

Here is a patch that fixes this problem. Please review.
-This patch will let you enter single char. choices
-It also eliminates the errors that show up in the logs about strlen not testing a string.

bryan kennedy’s picture

Status: Needs review » Closed (fixed)

Mario, was gracious enough to make me co-maintainer on this module. I've rolled patch into the latest dev version of the module, so I'm marking this fixed. Once I've addressed a few more open issues, I'll push out a new version.