I've got this module working just fine, love it.
I've got it displayed in a view, and was wondering if when displaying in 'Default Appearence', it could access the Label of the option. Not the Value.
ie: Yes not 1. or No not-1.

Comments

sierea’s picture

I was able to achieve my goal using project views php. Defining its out put via any row/variable offered in that field form.

if ($row->value > '1') {
    echo "No";
} else {
    echo "Yes";
}

No/yes are the options included in the rate widget 1 and -1 are the values assigned in the rate widget setup.

troybthompson’s picture

Thanks, using your code I was able to do this through a views template, but it does seem like it would be useful to have this as an option.

giuvax’s picture

I would like the same feature, because I have a rate widget with some options (I agree, I disagree, I don't care etc.) and every option is associated with a value, but when users vote I'd like to see "You voted 'I agree'" instead of "You voted 1". I looked inside the module to see if I can change the "t('You voted !vote.', array('!vote' => $vote)); into something like t('You voted !label.', array('!label' => $vote)); but I didn't find one single occurrence of the word label or something like that. If anyone could help it would be appreciated.
Thanks!

ivnish’s picture

Status: Active » Closed (outdated)

Drupal 7 is EOL. Issue will be closed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.