I took a look on the module - great work.

I think it would be usefull to implement two more things..

1. Allow "Cancel Vote" or disallow
2. Hide results from users

Hope I didn't overseen this features :-)



mario_prkos’s picture

I am glad you like it!
This question of show results is not easy one because of anonymous users. First pollfield can not know if anonymous user actual voted because there is no good way to identify them. So I try to figure how to do job even with such limitation. Basically, we need to treat problem separately; registered and unregistered users. So, my proposal will be:
First: I created permission to see poll results so you can give permission to any one you want.
Second: I created options in the poll settings so you can choose are you want user to see the results before he/she voted or not.
If you choose that user can not see results before he/she voted although unregistered users (anonymous) will not see results at all but registered one will see after they submit their vote.
There is already options to choose if you want to allow unregistered user to vote.
Only option which is not cover with this solution is where you want that registered user can not see results before voting and unregister user can see results of poll always. In my opinion this situation doesn't make any sense because for register user it is enough to logout to see results and probably user have to visit site before to login and in that case he/she can see results also.
Allow and not allow cancel button is easy and there is not problem about that.
Any suggestion is welcome. This new features will implemented for circa 7 days maybe before keep in touch I will post it here when I am finished.

First I will published those features in dev version after some testing I will published release.

mario_prkos’s picture

you can now try it in dev vesrsion

Apfel007’s picture

Hi mario,
wow.. you are fast :-)
I hope I find time to test your dev today. Tomorrow I'm going on holiday for two weeks. I will giv you response after that.

Cheers Kai

mario_prkos’s picture

Hi, Kai
I am looking forward to hear you. Have save trip and good holiday.

dddave’s picture

Version: 6.x-1.3-beta1 » 6.x-1.x-dev

Did a quick test of this module and the "Cancel" option works.

On a sidenote: I just tested this module for some minutes but already get the feeling that it really, really can solve the mess of advpoll+decisions. I hope I don't find to many problems with pollfield because advpoll and decisions make me sick. Polls as fields is an approach that provides some important options which the other modules are lacking.

mario_prkos’s picture

Thank you for your contribution! If, please, can you tell what is bother you most in advpoll and decisions modules. What you would change or making better? Is there any usability issues or lack of features? What features you find most helpful? Is it problems with quality of those modules (bugs etc. ) what bother you most or lack of support? I will appreciate your opinion and suggestions.

dddave’s picture

Don't want to go on a big rant but.....

1. Both modules should be united but due to personal differences ways split and now we have one widely used module without a propper D6 release and another one lacking userfriendly display options.

2. Both modules lack propper views integration. I am by no means a coder but I think it is because of the way these polls a constructed. They don't seem to be "real" fields and therfore the views integration is very lacky.

3. I wanted to go with decisions but the display is pretty ugly. I don't want to go to much into CSS magic. On the other hand decisions seems to be much better maintained then advpoll. The latter has much more options and displays relativly nicely.

I really think that this module can be a big leap because of the way it is constructed (at least as far as I understand it). What it still needs is some flexibility (the number of answer fields for example). I plan on using this module and will provide feedback. I noticed that the documentation is lacking and that there is no german translation. I hope I can contribute on this front but I fear that I won't have the time before the end of the month.

mario_prkos’s picture

This is still new module for D6 and there is lots of work to be done, any help is welcome especially about translation. Your suggestion is very useful to me. Maybe you can put some details what features you want see in pollfiedl module. I am glad that you are from Deutschland and translation to deutsch is something I am definitely want to see in pollfield module. Whenever you have time your help is welcome!

dddave’s picture

Title: great work » The future of Pollfield

I think this issue became some kind of brainstorming so I changed the title. I may repeat myself but I really love the approach of this module (poll as field).

As an attachment to content types this module is already great. Pollfield would become an absolute killer if we (well mostly you ;) )could find a good way to ease the building of an independent content type. What I try to achieve is a replacement for advpoll's or decision's content types. Building a new content type is already possible but you run into trouble because of the need to provide a node title. This title would be of course the poll question. Sadly this question has to be provided also in the poll settings of the node which makes the node itself akward looking. The problem is that the "Question" field cannot be left empty.

Of course this can be solved by themeing but a solution provided by the module itself would be awesome.

mario_prkos’s picture

This kind of discussion is something I want to go about this project and changing of title is good idea. I agree with your remarks totally and your observation about title is good point. I didn't think about it and you pointed it out and that is why user experience is so imported for me as maintainer and project in general. Also, I agree that concept as field is more flexible and better then standard poll-advpoll module. Of course that is one of reason we need to make this module good. D7 will strongly rely on CCK field module and that gives this module even more importance. I will put the title issue on my todo and hope I will find some suitable solution.
What types of poll you mostly use (multichoice, singlechoice, rankig poll itd)?

You post a great comment I looking forward for more; keep going. I will announce about this discussion on front page I and hope that other will join too. This is very vital and very important to go. In the beginning I put basics features which I know that is absolutely necessary but now we are going to next step which will determine look of this module.

portulaca’s picture

Node title = Poll question

Maybe add a check box for the node title "Title same as Poll question" that disables the Title field (just make inaccessible to write into it) and then populate it on form submit with Poll question, and hide the question in poll.

Or the other way around - this one is probably better - add check box for the Poll question field in Pollfield settings "Poll question the same as node title", and again hide the question in poll.

Can't wait till all this gets implemented :)

dddave’s picture

I think the most used poll is the singlechoice poll. Multichoice is useful and rankings are a nice advanced features but 90% of my personal usecases are singlechoice polls to get opinions.

About the titlefield problem:

I don't know if the question field has to be filled out due to the architecture of pollfield. If you could leave it empty there wouldn't be a problem. If that is not feasible the second checkbox option to omit the content of the question field in the node display would be a good workaround. This could be easily explained especially if we add a decent Read Me and perhaps a docs page.

mario_prkos’s picture

I did some little research and find out how can be done (title=question) with existing release and dev version. Actually, this option I built in in the beginning but I didn't have time to put proper documentation. But, now is time to do that.

The most next thing I think will be useful is make basic docs before I go any further development. Do some conclusions, debugs, collect some infos form users. This discussion are so useful in the way that tell how I will organize my efforts to achieve the most useful result. For example, if you tell that 90% of polls you use is single choice I have info about your needs and I can concentrate myself to deliver good pollfield single choice (it is 90% of your needs) and then later add other types of polls. Other thing is that we see from such infos is missed important features because of lack of docs which also belongs in your 90% of needs so now I have good guidelines what todo.

Code is important but what to code is really big deal. You can have good product with crappy code but you cant' have crappy product and good code (none want crappy product). With crappy code I mean code is working (more or less) but it is in mess and not elegant one.

As soon as possible I put first version of docs, Portalca agreed to help and you are welcome to join any time.
Thanks for your contribution dddave and portulaca.

bryan kennedy’s picture

Issue tags: +CCK, +fields, +voting

I agree with several of the commentators here, that this poll field module is the right direction for the future of Drupal voting type content.

I'd like to see the ability to allow anonymous voting, filtered by cookie, and filtered by Drupal session. Essentially the IP filtering solution doesn't work for me. There are quite a few instances where limiting by IP address causes huge chunks of people to be considered blocked from voting even though they may not have visited the poll:

  • intranet applications where outgoing IPs are masked as a single address
  • kiosk voting, where a drupal poll is used at a single computer for multiple humans voting (browsers can reset cookies and sessions, but not IPs)
  • multiple humans using the same computer in a household or in a computer lab of some sort

This would be a great feature improvement that could draw some folks away from the core poll module to this field poll. Anyone else have an interest? I'd be willing to put some development toward this, but only if it is considered useful in the project by the maintainers.

mario_prkos’s picture

Bryan, it is good pointed and good idea too. Identify users by IP is far not enough for anonymous voting. With cookie we can identify anonymous user's browser if user accepts cookies. It is best we can do. So, I will put this feature in todo list. In my opinion we can set cookie which has randomly generated number which identify user, poll_id and expire date. I think it will do the job. Good thing is that is not hard to implement. I can do that in few days in dev version. I appreciate your help and your feedback. This is excellent idea and I will add it as one more option in anonymous voting policy. Any suggestion is welcome.

igorik’s picture


This discussion is great. I really like this module, and I thank you that you are care about it.

I would really welcome if there will be a new poll content type based on this.

Title of poll node based on new poll content type would be a question, it make sense.

I would really appreciate dynamic adding new answers, same as it is in adv poll module.
I don't like a system with default max e.g. x (e.g. 5) questions. One user can create pollfield/poll with only 3 answers so two are useless, another user could want to create pollfield/poll with e.g. 7 answers.
So there could be set a minimum answers value in content type settings and then let user to add so many answers as he wants.

Some idea for new poll content type, admin could choose if he wants that pollfield polls will be counted as polls and they will be shown together with other standard polls, or not. Or it could be done by views with some apprpriate filter.

Thanks for your work

mario_prkos’s picture

Thank you for your encouragement. It was lots of fun developing this module, watching grow and talking with community. There are lots of very good comments and ideas. I very appreciate your positive feedback. It make this development fun and very good experience. You pointed out good usability question and I agree with you about that. This dynamic adding of choices is useful thing and it is on my todo list as you can see at sections features to be added in front page. Check http://drupal.org/node/597920 for title question. We are now working on some documentation which will provide some detail explanations about module, using module with cck and views. Your are right about views there many, many, many good things about views and one of them is that you can create content with pollfield instead of question you put ' ' and question put in title. Threat this as poll node. With filters you can treat it as node or as field or both and you can list different types of content types in different formats.

burningdog’s picture

This is a great module - I like how it uses CCK and integrates with views, and is simple to use. I have noticed that the handling of anonymous user votes is a little unpredictable - as an anonymous user I voted on a poll and although the vote was recorded, it wasn't tied to me - which should mean I could vote on the poll again, but when I did, I got an error. I'm not sure what's going on there...

A big feature request is viewing the results of individual users, like advanced poll does. Here's an example: http://advpoll.ck37.com/node/122/votes

(Update: I've added this as a feature request - #623148: View individual votes)

Keep up the good work - this is an exciting module!

mario_prkos’s picture

Thank you!
Working on this module is very exciting. I am little impatience to see this module fully equipped. My idea for this feature is to expose pollfield_votes table to Views by Views API so you can make your own filter what you want to see. Also I will add additional formatters so you can choose how this will be displayed to your site. Also I will put some additional table where can be stored more infos like comment field, name, telephones in totaly generic way also integrated with views. I am planning that you can make content type with multiple pollfield where vote will be submitted by one master button so you can make large poll make it through CCK framework. This will be next big step and I hope it will be finished before new year.

mario_prkos’s picture

According to this anonymous voting system. Can you tell about this error you got so I can check it. This is probably most difficult feature to test because I have only two computers. To achieve good quality I need help from you guys. I can build test online drupal site so we can tested alive voting using pollfield. If you are interesting to participate let me know and I will prepare everything.

burningdog’s picture

Thanks Mario - all I'm doing to test is opening 2 browsers on my local machine - one of which is logged into the website and one of which is anonymous. I'll see if I can re-create that particular issue with anonymous voting, and if so, I'll raise an issue.

portulaca’s picture

I think you can't test anonymous voting with only one computer because of the option to track anonymous votes by IP. Is that how your pollfield was set? Or was it set to track using cookies?

bryan kennedy’s picture

I posted a separate issue to continue hashing out these anonymous voting issues.

Since people were concerned about testing things out locally, I setup a test site. I hope that will help in the future as well.

burningdog’s picture

@portulaca - I'm using cookies to track anonymous voters.

igorik’s picture

When we will be have new poll content type finished, woul be great to have few blocks for this, e.g. "latest poll", then "wanted poll" (in block settings admin can choose which poll will be in this block, or he can set NID of this poll)


brulain’s picture

Thanks, very nice module!
But I am a little frustrated : when creating a new content, a user can access to 'Pollfield settings' only if 'Administer nodes' permission is checked. But I don't want to give this permission...

mario_prkos’s picture

You are right about blocks it will be good to have it. I consider implement blocks through Views so that can be various kind of blocks depends of what kind of filter you use. For doing this we need just to implement block formatter and little more integration with Views and all this things is in progress. I hope soon.

This is good question and problem is not easy one especially when anonymous user involved. By default this module use standard way of implement settings for nodes and all is handle through this well defined procedure (it is not part pollfield). If there is question for doing administration on different way it has to be done on separate way.
For you my question is what exactly you have in mind? What about anonymous user? How we will define who can do what?
I will be glad to discuss about this topic with community and find best way to handle it.

brulain’s picture

Thanks for your answer. In my case, I just want to allow some roles to edit the 'Pollfield settings' fieldset in nodes which contain a pollfield field... without giving them the 'Administer nodes' permission.
I am not a Drupal developer, so I can't help you to resolve it. Sorry...

mario_prkos’s picture

This put more light on your request. I just want to know how you use this module and what you really need. So if you have button Edit which is showed by user roles will it be OK to you? Those usability(features) issues can be difficult and everyone who use this module can be helpful with ideas and suggestion. I always find way to implement but what to implement is big question for me.

brulain’s picture

34.97 KB
15.1 KB

When a user with the right role (ex: admin) creates a new content containing a pollfield field (see attached file 'Create poll.jpeg' - in french), only the label 'Pollfield settings' appears. I'd like to have access to the fieldset (see attached file 'Create poll 2.jpeg' - in french).

jafar104’s picture

I have this same issue. I wonder if it's me or the module...but I really like this module. I cant wait till I can use it on production sites.

mario_prkos’s picture

Brulain drew some nice picture about layout and if I am understand correct this is about get editing options for editing pollfield if node editing is not allowed. This basically means that editing must be done on separate way and will not go through standard node/field edit options.

Do you need what Brulain want or you have something different in mind? What about anonymous? What you want for them to do?

This can be done. Creating and editing by anonymous can be tricky because I can not know what content belongs to whom?
I am working now on major pollfield release with bunch of new features and I hope it will be done before 2010.

brulain’s picture

Thanks a lot mario_prkos! Tell me if you need other precisions.
I'm waiting for the next release...

igorik’s picture

great news Mario.
Can you please share with us some rough estimate when new poll content type could be done?
So far I can understand it, you are working on poll field only, but would be great to have standalone poll conten type as we were talking above.


dddave’s picture

Just for the record: The docs in the handbook provide a tutorial for creating a poll content type. http://drupal.org/node/616816

aliciatheduff’s picture

Is it possible to allow an authenticated user to vote an unlimited amount of times??? I know this is a rare request, but in my situation multiple students share one account and would like to each get a chance to vote.

mario_prkos’s picture

For now it is not possible for authenticated users to vote unlimited time only anonymous has that option (if you choose that). You right this a little bit unusually. But I will definitely think about how I can help you.
How you can prevent them to abuse this privilege to vote multiple times or this is not important?

aliciatheduff’s picture

thanks for your reply mario!
it's a private organic group so the anonymous option won't work – they will be voting in a classroom setting, so i imagine each individual will only be allowed to vote once.

mpoplin’s picture

Just wanted to point out that I too am having the permissions issues that were mentioned.

WebmistressM’s picture

Title: The future of Pollfield » Response "Add Another"

I see how you can have unlimited number of polls on a page, but I think we should have a "add more" button below the responses so that the administrator can set the minimum of 2 options WITH the ability for the end-user to add more if they need to. As of now, I have to guess the max number of responses that our user group would actually need and hope it is enough. This makes it so that the end-user might have to scroll a while to scroll past all of the response fields set up according to the amount set.

dddave’s picture

Title: Response "Add Another" » The future of Pollfield

Please don't change the title.

Perhaps the problem discussed above deserves an issue of its own?

ManyNancy’s picture

Status: Active » Closed (fixed)

This issue should not be a dumping ground for misc issues. The previous question already has an issue:
#530810: let author to choose how many values he wants

brulain’s picture


I have just installed the last dev release, and I see that my request about editing pollfield settings without 'Administer nodes' is implemented : thanks a lot Marko !

sirfritz’s picture


Thank you for your work so far on this module. I have a small problem which I'm hoping you can help with please.

My site has a private forum, only accessible to authorised (logged in) users, there is also a single admin user (me).

I would like users to be able to add simple yes/no voting polls to forum posts.

I have most of this setup, adding a poll field (field_poll) to the forum content type etc.

However, in order for authorised users to be able to create a poll it seems I have to assign them the edit field_poll in content_permissions. Which then allows them to edit any poll, with the effect that they can re-vote, or if they edit the poll and preview they can cancel their vote, even if the poll was setup by admin with cancel vote set to disallow.

If I revoke the edit field_poll content permission then authorised users can no longer add polls.

So, to clarify I would like polls to be editable only by the user that created them, or admin. Is it possible to effect this behaviour currently or would perhaps a create field_poll permission be appropriate as well as the edit permission so they could be assigned independantly?

Thanks for your support.

Kind Regards

mario_prkos’s picture

For now we have to 3 level of permissions.
1. permissions connected to node permission:
create/edit/delete own,
create/edit/delete any,
2. cck permissions
edit/view each field
3. pollfield permission in the version 6.x-1.11-BETA1
admin pollfield - this is explain in the doc and front page.

If your content is node type you can use permissions under 1. to control who can access, edit etc.
What content type you use to put the pollfield? I think that in forum forum topic is node content type and posts are comments.
So can you give more information about how you use the pollfield module?
Also we have permission discussion in http://drupal.org/node/627682 fell free to join and comment!

sirfritz’s picture

Hi Mario,

Thanks for your response. I've read the other post you mention regarding permissions.

I think that it's right for pollfield's permissions to be specific and not 'reliant' on other content types.

For the site I'm working on anon users can only view a subset of the full site, e.g. view some static about pages, view blog and view images. Authenticated users (site members) have access to post blog entries (but not delete, even their own) and have access to a completely private forum, where again they can create and edit their own topics, but not delete.

I'm trying to use the pollfield module to provide simple yes/no votes on posts (if required) - it's good that if no poll title is included that a poll is not attached to the forum post.

Options to assign admin, create, edit any, edit own, delete any, delete own permissions per pollfield use (each poll) per user type (anon/authenticated/admin etc.) would be great.

Currently assigning the edit poll_field permission means that an authenticated user can edit the poll options (from yes/no to anything else) of any poll and if they preview during this edit they see the cancel vote option (even if it's set to disabled during the initial poll_field setup). They can then cancel their vote and re-vote in this way.

I'm not a developer, so I'm afraid I don't necessarily understand the complexities that may surround this level of flexibility.

Thanks for taking on board this request. I'd be happy to provide more specific details or clarification if you need it.



Rosamunda’s picture

Status: Closed (fixed) » Active

Let´s see if I can update myself ;) with all this info:


Pollfield should allow site admin to control what features are accesible within each pollfield (within each nodetype)
Sort of checkboxes inside the field configuration that could be something like:
[ ] Don´t allow anonymous voting
[ ] Don´t allow to cancel vote
[ ] Don´t allow to use the starting votes count field. All polls must start with 0 each.


Site admin should be able to set who can change the settings that he has configured for that specific pollfield, who can use the pollfield but only within the settings that the site admin has configured, who can vote on the pollfield and see its results
Let´s see what we´ve already have:

1. permissions connected to node permission:
create/edit/delete own,
create/edit/delete any,
2. cck permissions
edit/view each field
3. pollfield permission in the version 6.x-1.11-BETA1
admin pollfield - this is explain in the doc and front page.

I think that permissions should be used only when strictly neccesary, so, in that thinking, I see that there´s no need to create more perms.
Let´s see:

Site admin should be able to:
a. set who can change the settings that he has configured for that specific pollfield
We can use the "Admin Pollfield" Permission on dev´s version

b. who can use the pollfield but only within the settings that the site admin has configured
We can use the create/edit/delete own CCK permission here.

c. who can vote on the pollfield
d. who can see its results
For these two, we could add an option inside the edit field link that says wich roles can do those things. Something like:
- Who can vote on this pollfield?
[ ] Anonymous
[ ] Registered
[ ] etc...
- Who can see its results?
[ ] Anonymous
[ ] Registered
[ ] etc...

These are the basic stuff that we can all agree with, I think...?

This is getting better and better!

Rosamunda’s picture

I just forgot to mention my opinion on #47.

... in order for authorised users to be able to create a poll it seems I have to assign them the edit field_poll in content_permissions. Which then allows them to edit any poll, with the effect that they can re-vote, or if they edit the poll and preview they can cancel their vote, even if the poll was setup by admin with cancel vote set to disallow.

I really don´t understand how did you configure your perms: If users can create poll_nodetype_X and have the poll_field_ABC edit permission, they shouldn´t be able to edit other people´s polls. I mean, at least if they don´t have "edit any" poll_nodetype_X permission.


sirfritz’s picture

Hi Rosamunda,

Thanks for your comments and summary of permissions.

I agree entirely that it should be possible to separate the permission of poll creation from poll editing - but if it that is possible right now I'm not sure how to do it.

As I said, the only way I seem to be able to get authorised (i.e. logged in site users) to be able to create a poll within a forum post is to grant them the edit field_poll permission in content_permissions.

"b. who can use the pollfield but only within the settings that the site admin has configured
We can use the create/edit/delete own CCK permission here."

Under Content Permissions I only have edit field_poll and view field_poll - there is no create field_poll option or indeed any mention of any/own - am I missing something?

The other anomaly I mentioned above is that even if as admin I tick the don't allow cancel vote check box - if any other registered user chooses to edit that poll and during that edit they click preview, they then see the cancel vote button and can use it to cancel a previous vote and then after saving the changes to the forum post they can re-vote.

I'm happy to admit that it's quite possible I may not have a permission setup quite right - but everything on the site seem to work fine. I am using ACL, Forum Access and Node Access to secure areas of the site currently.

I'd be happy to advise the setup of specific permission if you let me know what would be useful.

Kind Regards


mario_prkos’s picture

Permissions from node module can restrict who can edit access or delete pollfield since it is placed in some content type/node. For example if user have permission to edit own forum topic where pollfield is placed he/she can edit only forum topics which belongs to him/her.
The same thing is with create. Pollfield is create when node where pollfield placed create. It can not be create by itself - stand alone.
I hope it helps.


mario_prkos’s picture

I agree with you. This list of users who can vote on poll is not bad idea.
It is wort to consider it.

achilleas’s picture

Hi Mario. Great work so far, and many thanx for your contribution to the drupal society! I would like to tell you what I would like from the module...

1) I would like to be able to set up a pollfield with a certain number of possible answers. Once this is configured, I would like it to stay the same for all later cases, without giving the users the capability of changing them. i.e. User creates a node type X where I have previously configure to have the pollfield attached to it. So each time the user create a node, he is actually creating just a title + body, BUT he has nothing to do with the pollfield that is attached to the node, ( the number of the possible answers AND the content remains the same as when I first configured it). So if I have set up the pollfield with 1 question (e.g. is this a good thing?) and 2 possible answers YES / NO then ALL nodes created by users will have at the bottom the same question and the same set of possible answers..

2) Once I create a view to display all the nodes, each time someone votes, I would like it to change the result on the vote BUT stay on the same page, same node.. NOT focusing just on that node, and then have users to select the view / refresh to get back.. Is this about the use og Ajax?

If you manage to implement the above described functionality you will make a lot of people really happy ! Right now cannot figure out how to implement this.... and is really bothering us...


mario_prkos’s picture

Hi, Achilles.
Did you try to use edit_field_... permissions to restrict access on editing field and use default values as set up of pollfield. I am not sure if i understand you right but I think I can help to setup this.
2: Can please clarify more about what did you think about it. By

I would like it to change the result on the vote

you mean vote on poll? By

NOT focusing just on that node

you mean not to be redirected on node page but stay on view page? I worked oh this problem and I think I can help you. Of course, if I understood this correct.

achilleas’s picture

Hi Markos !

Yes, I did try what you said on the 1st issue (try to use edit_field_... permissions to restrict access on editing field and use default values as set up of pollfield).. and it works! So many thanx!!

On the second issue now ... yes, I mean "not to be redirected on node page but stay on view page"... and change the result on the vote poll that the user has just voted.... otherwise it displays only that specific vote poll ... so the user has to go back to the view... and then try to find the specific node again... where I would like the user to be able to see immediately the change on the vote poll.. and still being on the view page to be able to continue by - probably - selecting the next node on the view.... and so on...

I hope you get the idea.....

What do you think?

mario_prkos’s picture

Redirecting problem is pointed in the dev version. You can download and try it. There is also new feature. There is view you can use to see user votes on different pollfields. If you see any problems you cane easily back to old version. I will appreciate your feed back and let me know is there any problem.


achilleas’s picture

Just tried it and looks much better ! So thanx again ! One thing though that could be better and I think is essential for being user friendly...

The focus now stays on the view.. BUT.. still does a refresh that points you to the start of the page.. i.e. if a view displays lets say 100
nodes.. and user votes on node no 50... somewhere in the middle of the screen... then it would be nice to remain there.. and not to take you to the top of screen... so you don't have to go back and try to find where you voted.... This would make it perfect my friend..

mario_prkos’s picture

Yes, understand that it will require little to experiment. At the end of the pollfield_vote() function we need to put right redirection. Try to put:
I manage to implement this on my site but I am not have time to test it with clean url or other setups.
Tell me how it behaves and we will try to find right solution. If you have problems with this just delete form pollfield_vote().

Cheers, Mario.

sirfritz’s picture

Hi All,

Thanks for the various replies to my posts thus far. I have stripped out all the permissions and uninstalled nodeaccess. I am now using the content_access module to see if that would enable me to get pollfield working in the way I want.

Before I run through the permissions and setup, I'll just re-explain my requirement.

I'm after a simple way to allow authorised users to add a question, on which they and other authorised users can vote, to a forum post. Voting, or indeed access to the forum is not available to anonymous users.

I always want the answers to be a) yes or b) no and I never want anyone to be able to cancel their vote or vote more than once.

I have the following permissions setup -

Under Content_Permissions module (CCK permissions)
I have edit field_poll checked for authenticated users and admin
I have view field_poll checked for authenticated users and admin

First anomaly - If I uncheck edit field_poll for authenticated users here then the poll section does not appear when trying to create a forum post.

I do not have any create permissions under this CCK section - create permissions are mentioned in a number of posts above, but I don't know where to find these?

Under the node module
Access content is granted to anonymous, authenticated users and admin

Under the Pollfield module
admin pollfield field_poll is granted to admin
view pollfield results field_poll is granted to admin and authenticated users

Within the forum content type access permission are set as follows
View any content granted to admin and authenticated users
Edit any content granted to admin
Delete any content granted to admin
View own content granted to admin and authenticated users
Edit own content granted to admin
delete own content granted to admin

Having stripped out all the permissions and installing the content access module authorised users are no longer able to edit polls created by other users - which is a step forward.

When an authorised user now creates a poll within a forum post it appears as it should.

Second anomaly - When they or another user then vote the page seems to get redirected to a list of posts/comments - rather than just showing the forum post with their vote cast.

Third anomaly - Further if the user goes straight back to the forum and clicks on the topic on which they have just voted they now see the Cancel Vote button - even though this is set to disabled with the managed field settings within the forum content type?

I'd really appreciated some help to get this working correctly, it seems so close, but I keep tripping up!

Also, whilst I'm posting - I use formfilter across the rest of the site to reduce the options available to users when they create posts/comments and it works REALLY well. It would be great if the pollfield section of a forum post form could be filtered in this way - it could allow all sections apart from the question to just not be shown to the user.

If this were possible, along with ironing out the permissions issues I'd be very happy.

Thanks in advance for your support and patience.


sirfritz’s picture

Hi All,

Since posting the description above I realised I had not re-created the pollfield since changing all the permissions - and suspected therefore that they may not be taking effect (as the content was pre-existing).

So, I removed and re-created the pollfield in the forum content type. Also updated to lastest dev version (10th Feb)

Still need to have edit CCK permission for authorised users to be able see the Poll section during the creation of a forum post.

Once post is created the user does now see the updated vote results - however the Cancel Vote button is now displayed immediately - even if it's disabled in the pollfield setup.

My comments regarding formfilter still stand - integration here really would give me all I'm looking for and from some other previous comments regarding having standard answers etc may also provide a solution for other users.

Thanks again for all the work so far on this module.


achilleas’s picture

Hi Mario... I did what you said and the results are:

If I add the code at the end of the pollfield_vote() function, once I am at the view page and vote on a node, drupal takes me to
a different page! My site has only 2 pages.. the welcome page, and the page with the view... so it takes me away from the view and
to the welcome page. The same thing happens either I vote on a node, or I cancel my vote....

When I take away the code, then it behaves as before, i.e takes you to the top of the page, but at least is the same page...

I guess it will take some more debugging, but hey.. thank you so much for taking the time man!

mario_prkos’s picture

@achilleas. Don't give up my friend you are close to solution. Can you send me link to page? Or go to page with view; use webdeveloper (assume you use firefox) to show me anchors and send me a screen shot. If you have some confidential information on page just black them and then send me.

mario_prkos’s picture

Hi Mark.
Yes this is handled I think, by CCK module. If edit is not checked there is no way to access edit options of pollfield.
So, if I understand you correct you want to control every aspect of edit form of pollfield regardless what other permissions.

Once post is created the user does now see the updated vote results - however the Cancel Vote button is now displayed immediately - even if it's disabled in the pollfield setup.

I need to check this out.

achilleas’s picture

Hi Mario, and sorry for the late response my friend.. I was on a 2 days holidays and there was no internet connection!
I would like to send you a link to the page, but right now I work on it locally. However, I will get a host and upload the page
ASAP, it should not take me more than 1-2 days. Once done, where can I send you that information?
Is the bellow link OK?
OR should I use an email address? There is no confidential info right now, or any other info, as I first try to configure out the technical way to
achieve the desired functionality. So I can even send you the login info to login and have a look. Thanx so much again!

mario_prkos’s picture

No, problem. Link is OK, we can continue our correspondence by email once you send me message with yours contacts by my contact link.


sirfritz’s picture

Hi Mario,

Would be grateful if you could suggest why, even though I have the Cancel Vote button set to disallow in the pollfield creation - it appears once a vote has been cast?

I've tried the latest dev version, but still the same problem.

Regarding my previous post and your query; I'd simply like to be able to select which components of the pollfield setup authorised users can access when they create polls.

The way I do this with other content types is to use the formfilter module to hide options that I don't wish users to see.

Kind Regards


mario_prkos’s picture

Hi Mark.
I tested cancel button and I didn't notice any problem. Can you please give some more info about what you have installed:
What is version of CCK you use?
Is there any module that might effect the behavior of pollfield?
What is settings of content type you have the problem?
Is this problem with all users or just some of them?

If you can give me a link or screenshot it will be helpful.


sirfritz’s picture

59.47 KB
52.87 KB

Hi Mario,

I'm using the latest version of Drupal 6.15 and CCK 6.x-2.6

All other modules are using the latest versions.

I'm using ACL, Content Access and Forum Access for permissions.

I'm afraid I don't know what other modules might affect pollfield, I can list all the installed/in-use modules if that would help - let me know if you think you need this.

I've added a single pollfield to the forum content type (I'm using the Advanced Forum module). Let me know if you need the specific permissions for forum content.

As far as I can see this is a problem that affects all users that can access/post in the forum - which is only admin and authorised users.

I've attached a screenshot of the pollfield config - hope that helps.

Please advise what other detail you need.



mario_prkos’s picture

Hi, Mark!
Can you send me screenshot of pollfield settings under the edit options of node where pollfield is placed. As I can see those screenshots are default values of pollfield field.
I am still trying to reproduce your problem but so far no success.


sirfritz’s picture

Hi Mario,

OK, some more testing - I can see that when I as admin create a new forum topic all the default options remain intact - i.e. the cancel button doens't appear for me or other authorised users.

However, when I login as an authorised user and create a forum post with a poll, the cancel button then appears.

Now, authorised users can't edit content (even their own), so I have to logout and log back in as admin - when I then edit the forum post I can then see that the cancel vote button has mysteriously been set to allow?

I'm using formfilter to reduce the options presented to the user to just the question. I've revisited this and when I set the filtering on the pollfield section, with the cancel vote set to disallow, and then even before saving the filtered form, I click preview a filtered version - this shows the cancel vote option as changed to allow.

So, there is some kind of interaction with formfilter perhaps?

Let me know if I can do any further testing or detail more settings.



j0e’s picture

Mario, How stable is the dev version. I basically just want to get rid of the starting votes count field
which is in the current version. If the dev version isn't stable I would forego having complete permissions
control for just being able to get rid of that one field. Is there a way to do that easily?

j0e’s picture

nevermind, thanks for the great module Mario; fixed my problem...

to remove the vote manipulation option, i just cut out the following code from the file pollfield.module in the pollfield module folder.

$element['group'][$delta]['votes'] = array(
'#title' => t('Starting votes count (optional)'),
'#access'=> $access,
'#type' => 'textfield',
'#default_value' => isset($value_vote) ? $value_vote : '',
'#size' => 10,
'#weight' => floatval($field1['widget']['weight'] + ($delta / 10) + .1),

Marat’s picture

Sorry for the interruption. If the ranking poll is added to this modules, Pollfield would be the successor to AdvPoll and Decision.

mario_prkos’s picture

Ranking poll is on road map. First I want to stabilize dev version then we can go to add more features.

sircurmudgeon’s picture

Unless I've totally missed something, a way to inspect all votes would be awesome and make this -the- poll module.

Permission based ability to inspect votes, or a way (with basic instructions) to make a view that can inspect all votes within a node.

I need a way to allow mods to see who voted and how on each poll question within a content type. AFAIK, this is the only way to make a full on ballot with multiple questions within a single node, which is what I need (although I'm not sure how well that works yet)

mario_prkos’s picture

There is way to inspect votes using views. This feature is available only in dev version, for now. You can try it. There is also of template view which is built when you install dev version. See under the views pollfield_votes. Off course you have can use all good things what views can give you.
Try it and tell what you think if you have questions don't hesitate to ask me.


sanderd17’s picture

I didn't read all the things here (it's quite long :p) but I wonder if there is a way to only show the poll inside the story and not on the front page.

For the rest, pollfield is easy to use and quite powerfull. Thanks.

j0e’s picture


Is there a way to delete vote results for a particular poll? If there isn't, this is highly useful functionality
that is being included in other modules like advanced poll and decisions. But it's more necessary
here since this poll uses cck, and is therefore attached to a node. Without the option to delete
the results and rewrite questions for a poll, new pollfields have to be added via cck each time.
And this is impossible to do when you're allowing users to create their own polls, without letting
them get into your drupal admin. (The only other route would be integrating pollfield with "add another item"
functionality, so that the user could create unlimited polls for a particular node, thereby avoiding the
need to delete poll results...right now, that doesn't seem to work either.)

If it's not there already, hope you can add the delete vote (& integrate add another item) functionality.



owntheweb’s picture

Thank you for this module. It's AWESOME. With that, here's my frustration:

I'm trying to specify a poll using the php box. I'm doing that because when using the rules module, creating a node using a triggered rule, if I don't populate the pollfield, I don't get default options to vote on when viewing the node, just a 'Vote' button (sorry for the long sentence). That's a minor irritation, but the frustration is in the php part for me.

The help text says:

Advanced usage only: PHP code that returns the value to set. Should not include delimiters. If this field is filled out, the value returned by this code will override any value specified above. Expected format:

return array(
0 => array('question' => value for question, 'active' => value for active, 'runtime' => value for runtime, 'choice' => value for choice, 'votes' => value for votes, 'anonymous' => value for anonymous, 'poll_features' => value for poll_features),
// You'll usually want to stop here. Provide more values
// if you want your 'default value' to be multi-valued:
1 => array('question' => value for question, 'active' => value for active, 'runtime' => value for runtime, 'choice' => value for choice, 'votes' => value for votes, 'anonymous' => value for anonymous, 'poll_features' => value for poll_features),
2 => ...

I'm not sure how to fill in some of the values. Here's what I have so far:

return array(
  0 => array('question' => 'Do you vote to approve or reject this application?', 'active' => 1, 'runtime' => 0, 'choice' => ???('Approve', 'Reject'), 'votes' => ??? (none), 'anonymous' => 0, 'poll_features' => ??? (single choice?))

Any thoughts on how to fill that in? It would make my day. :)

Thank you,


owntheweb’s picture

Ah, got it. Devel helped out when viewing the devel tab on the contact page:

return array(
  0 => array('question' => 'Do you vote to approve or reject this application?', 
  'active' => 1, 
  'runtime' => 0, 
  'choice' => 'a:2:{i:0;a:2:{s:6:"choice";s:7:"Approve";s:5:"votes";s:0:"";}i:1;a:2:{s:6:"choice";s:6:"Reject";s:5:"votes";s:0:"";}}', 
  'votes' => 0, 
  'anonymous' => 'anon_non', 
  'poll_features' => 'a:3:{s:16:"CancelVote_Allow";s:1:"1";s:12:"ResultsAllow";s:1:"0";s:8:"PollType";s:1:"0";}' 
mario_prkos’s picture

Thanks for posting solution of your problem. It will greatly improve knowledge base of this module.

chompz’s picture

Title: The future of Pollfield » Can't Sort By Pollfield Result In Veiws

I am trying to use Views to sort my content based on Pollfield results. Could someone familiar with Pollfield and vies provide me some instructions on how I could sort my results based on poll results.

Thank you,

dddave’s picture

Title: Can't Sort By Pollfield Result In Veiws » The future of Pollfield

Please don't change the title. And please make yourself familiar with: http://drupal.org/node/317

About your problem: There is a short tutorial on the project page. Start with it and make the changes you need. In general you should play around with views to get a feeling how it works. If that doesn't help, please file a new issue.

edit: just noticed that you also filed a forum topic about your problem. Posting the same stuff in different areas in a no-no on drupal.org. Not resetting this issue also.

chompz’s picture

Sorry about that guys. I am new to Drupal. When I posted on this thread it did not do what I wanted and I couldn't find a way to delete the post, which is why I posted it somewhere else that made more sense.

sHaDoW_LiGhT’s picture

First, I installed this module instead of the standard poll module beceause I wanted a custom "polls archive" page which doesn't display only the title and statut of polls, but also the poll results (only results not vote forms) in a light way (where responses + vote + result take only in 1 line) like this page http://www.zdnet.fr/actualites/sondages/

I think its a nice way to display all polls (with results) without takin up too much space like when using views node display. unfortunately I can't get this display, and can't get control of poll field fields individually in views. there is only 1 global field "content : pollfield" so I tried to create my own pollfield formatter but without success and I don't know php enought to do it. So I just suggest it for the future of this module.

Nice work

chompz’s picture

It would be sweet if there was some way to control how many times a person could vote. For instance, there is 10 nodes and each has a pollfield, but allowing the user to only vote on 2 nodes. Not sure if that exist already, but I can't find anything on it.

johnnygg’s picture

thanks for really useful module. i'm surprised more people don't use it, i hope it's not on endangered species list! I respectfully request more integration with rules as the result of a poll needs to be acted upon. i'm still learning but would be willing to help out with documentation and testing. thanks!

portulaca’s picture

Rules integration sounds useful, do you have any usage example?

I can think of sending emails when a poll choice reaches a certain amount of votes, or each time a vote is cast.

The maintainer has been very busy with paid work lately but there are plans for more features and fixes for pollfield so stay tuned :D

johnnygg’s picture

hi. i have a pollfield for each node that has 4 choices. whichever choice gets 100 votes 1st effectively 'wins'... i'm trying to implement a computed field that will contain a different decimal value depending on the outcome.

from the devel module i think i have correct variables...

'field_settlingpoll' is name of pollfield.......but for the 4 options...there are 4 arrays.. im only begginer level at php. not sure of correct syntax for 'if choice A has 100 votes do this' else 'if chose B has 100 votes do this' else C...D...ETc

is it 'field_settlingpoll [0].votes = 100 ' or something similar?

from devel module...i have an array like this for each of the 4 choices in the poll... i'm only concerned with 'choice' and 'votes' i think..

field_settlingpoll (Array, 4 elements)
0 (Array, 7 elements)
question (String, 33 characters ) What is the outcome of this Bear?
active (String, 1 characters ) 1
runtime (String, 5 characters ) 86400
choice (String, 400 characters ) a:4:{i:0;a:2:{s:6:"choice";s:49:"Winner (e.g. i...
votes (String, 1 characters ) 0
anonymous (String, 8 characters ) anon_non
poll_features (String, 89 characters ) a:3:{s:16:"CancelVote_Allow";s:1:"0";s

i'll keep plugging away til i get there. thanks!

Taxoman’s picture

Version: 6.x-1.x-dev » 7.x-2.x-dev
Taxoman’s picture

FYI: work on a D7 port of Decisions just started here: #1032964: Port Decisions module to Drupal 7
Which features of the Decisions module could be added here, if a merge would be possible?

Leeteq’s picture

Issue summary: View changes
Status: Active » Closed (duplicate)
Related issues: +#1935158: Pollfield still being maintained?
igorik’s picture

thsi is (not) funny, drupal 8 is out and here still it is not full d7 release. this module seems to be dead soon.