Closed (won't fix)
Project:
Pollfield
Version:
6.x-1.9-beta1
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
25 Sep 2010 at 02:36 UTC
Updated:
25 May 2011 at 01:48 UTC
Hi,
I added a question below my nodes, like "Was this article helpful? Yes No"
and this module really did the job, I tried other voting modules but can't customize them
as easy as pollfield.
I attached a screenshot and the codes I used of what I did, I know you can do better,
I was thinking maybe you can incorporate this to your module as an option:
[] Hide submit button and automatically submit form by clicking a response (for single response/answer only)
CSS:
.field-field-helpful { height: 50px; }
.field-field-helpful .pollfield-title { font-size: 1.2em; float: left; padding: 5px 0 0 }
.field-field-helpful .form-radios { width: 200px; height: 20px; float: left; margin: 0; padding: 0 10px; }
.field-field-helpful .form-radios .form-item { width: 50px; height: 20px; float: left; margin: 0; }
.field-field-helpful .form-radios .form-item label { cursor: pointer; color: #001c47; font-size: 1.2em; font-weight: bold; display: block; padding-top: 3px; }
.field-field-helpful .form-radios .form-item:hover label { color: #999; }
.field-field-helpful .form-radios .form-item label input{ opacity: 0; filter: alpha(opacity = 0); margin: 0 2px 0 0; }
.field-field-helpful .barcell { width: 100px; }
.field-field-helpful .barcell .bar { width: 100px; }
.field-field-helpful .form-radios #edit-choice-0-wrapper { background: url(images/icon_hand.png) left top scroll no-repeat; }
.field-field-helpful .form-radios #edit-choice-1-wrapper { background: url(images/icon_hand.png) left bottom scroll no-repeat; }
.field-field-helpful form#pollfield-voting-function-form input.form-submit { display: none; }
Jquery:
Drupal.behaviors.pollfieldsingleresponse = function () {
// Check if radio button is click
$(".field-field-helpful form input.form-radio").bind("click", function(){
$("form#pollfield-voting-function-form").submit();
});
};
Thanks :D
| Comment | File | Size | Author |
|---|---|---|---|
| custom_pollfield.png | 4.38 KB | danielhonrade |
Comments
Comment #1
bryan kennedy commentedHey this is a great use of pollfield. I don't think this is appropriate to roll into the already full module. However, I think this is a great tip for users. So I moved your suggestion over to the pollfield documentation as something that users can enable themselves. http://drupal.org/node/1167918