Usually, polls are anonymized. We need to process total votes, percentages... Now, in the context of Ukraine invasion, an institutional client wants to enhance an Advanced poll existing implementation, in order to collect citizens' data about their possibilities to host families, help with donations, and so on. And of course to reach out to the people who answered the questions...

While this could certainly be done with Webform, the team is used to poll UI, everything's already in place... and we need to go fast.

I couldn't build a poll Views with relationships and retrieve the voters' ID, emails... or the other way down from users to its poll votes... It seems that Views cannot map poll choices / results with the users who voted.

The poll_vote table contains the core info for that feature, with a chid field (the choice ID), a poll ID pid, and uid. The choice label can be then retrieved from poll_choice_field_data table...

Should I extend : `Drupal\poll\PollViewData\ with a couple of Views field handler plugins, and how ?

Not sure what would be a straightforward way to solve this. Maybe I'm missing the point ? Any help, code starter, is warmly welcome to solve this quickly. Thanks


1 Answer 1


To solve it quickly, I would use Webform. Webform already does everything you need and is widely use (one of the most popular contrib modules).

The problem is that Poll is designed to be a one-question poll, not a full survey.

Even if your team is less familiar with Webform, the module is designed so that even non-programmers can easily make forms. I imagine that a form to collect basic personal info with some custom fields would only take an hour or two to implement assuming you already had the form design.

Alternately, if there's some problem installing a new module in the environment, I would go for Google Forms, which won't match your site design at all but is also extremely fast to implement and take down.

  • Thanks for your reply. I forgot to tell that I built them a full survey design on top of Poll, a simple content-type with a field to add polls, a summary... Hence the fact that I'm only missing the glue in Vievs to retrieve the user voters uid and wrap it all...?
    – Kojo
    Commented Mar 26, 2022 at 9:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.