I added a CCK pollfield field to an (already existing) node content type.
When I create a node of that content type, everything works (almost) fine as long as I add 1 or 2 polls to the node.
(I say "almost" because pollfield has other minor bugs... but for the moment let's stay focused on this topic.)
That means I can perform with no problem the following steps:

  1. create the node
  2. create the pollfields
  3. save the node
  4. eventually vote the polls
  5. edit the node and the pollfields
  6. save the node again

But if I create a node with 3 or more pollfields I have a problem at step:

5. edit the node and the pollfields

When I'm editing the node (node/123/edit) the 3rd pollfield (but also the 4th, the 5th and so on....) has lost almost all its choices
(while the first and the second pollfields choices are correctly displayed)
I could readd the missing choices again clicking on the button "add choice" and then also the votes are still preserved but surely this is not the expecting behaviour.

Files: 
CommentFileSizeAuthor
#7 no-pollfields.jpg23.35 KBdiego.pasc
#7 error.jpg132.25 KBdiego.pasc

Comments

same here.

Assigned:Unassigned» bryan kennedy
Priority:Normal» Major

I am looking into this issue right now.

I think I've eliminated "some" of this problem in the latest dev commits.

There is still an issue with the "More Choices" button not working as specified, but that is only on the edit form.

Try the latest dev, and let me know if you are still seeing this same behavior. I will continue to look into the code and test more situations to see if I've really fixed the issue.

Hey Bryan,

I think you could make this whole issue easier on yourself by scrapping the entire choice input, and just use a plain textarea.

Like CCK uses for simple options widgets...

For me, having a minimum vote count at the beginning does not make sense anyway. :) But if that needs to be kept, it could be used as an option input separated by a dash

5|Yes
19|No

Thanks for the suggestion siorgio79. This could potentially be easier to code, although fixing the bugs in the existing code is probably the quickest path at this point.

I also think your suggestion would be a step backwards in usability for the node editor. One of the great things about CCK fields is that they give the user a very common interface for creating content. The user doesn't need to learn any special markup, just fill out a field. For that reason I don't think it would be a good idea to make poll choices work like you suggested. It's an inventive thought, just probably not the best user experience in the end.

I also don't use the pre-determined vote counts on my websites. However, that functionality has been in the module for a while, and I am pretty sure several people do use it. I think it might be useful for situations where you are continuing a poll from a previous non-Drupal state.

Thanks Bryan for coming back. Just thought it would be a quick fix. Since pretty much every user has used an options widget, the most basic CCK field, relying on that way of defining values may not be as user friendly but definitely familiar. :)

Anyway, you are the boss here, so do as you see fit :)

I definitely like the current setup, I can just imagine it is more complex to maintain.

It essentially resembles a CCK Multigrou, have you seen that in CCK 6 3? (http://drupal.org/node/324929)

Or there was another attempt at such definition here
http://drupal.org/project/multicrud

In D7 the winner became http://drupal.org/project/field_collection
#939836: combofield / fieldentity / field-collection / embeddables

StatusFileSize
new132.25 KB
new23.35 KB

First of all thanks Bryan for your efforts.
I checked your last dev right now and it is not working to me: It's even worst than before! :)
Now when I add a node with a pollfield, I can't create pollfield (see my first attachment)
And if press "Add another item" some errors are raised (see second attachment)

I tried the latest -Dev (July 3), but when I update the code, the results for my poll shift a row. This may be because of a removed choice, which in the edit view is invisible in 1.1, but visible as empty in -dev.
More choices is indeed still not working - is this fixable?

same here...