When trying to retrieve the poll submission details using views such as question, selected choice, and so on, specific to the user who cast his/her vote; I don't see any choice or answer field. Instead, I can see a related field that displays an alpha-numeric tag value for each choice. Moreover, this tag value is stored in the database.

Please find the attached screenshot from the views interface (highlighted in yellow) that demonstrates this tag value display.
File name:- AdvPoll_issue_view_tag.png

On the other hand, the actual choice is being displayed on the interface that falls under the "Votes" tab of a specific Advanced poll content.
Please find the attached screenshot (highlighted in Green) that displays the actual choice value.
File name:- AdvPoll_issue_Choice_Correct.png

Is there any way to convert this alpha-numeric tag value to it's associated choice? To be more precise, can anyone help in creating a patch that actually converts this tag value to it's associated choice prior to it being rendered as the view field?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

surendramohan created an issue.

drupal-son’s picture

Hi, I find the same issue.
Wondering if/how you resolved the issue.

Thanks.

introfini’s picture

Just as a quick fix you can add a Views PHP field with:

$advpdata = advpoll_get_data(node_load($row->nid));
 foreach ($advpdata ->choices as $choice) {
    if ($choice['choice_id'] == $row->tag) {
      return $choice['choice'];
    }
  }