HowTo: Create and use a poll content type build with pollfield

Pollfield usually is used to provide polls as part of nodes. But you can also use it to create a generic poll content type similar to those provided by the core poll module, Advanced poll or Decisions. So if you do not need a certain unique feature of those modules you are fine using pollfield module alone.

A. Creating a new content type
Make sure you installed and enabled pollfield module correctly before you try to do the following.

  1. Go to Administer->Content Management -> Content types -> Add Content type (system path: admin/content/types/add)
  2. Enter a name: Poll
  3. And a type: poll
  4. Submission form settings -> change "Title" field label to “Question”
  5. If you like, you can also change the label of the body field
  6. The other settings can be left as they are
  7. Save!
  8. On the next screen (system path: admin/content/types) locate the Poll content type and click on its edit link.
  9. Adding the actual pollfield: Locate the “Add” area to find “New field” -> Label: Poll, fieldname: poll, field type: pollfield, widget: leave as is-> SAVE
  10. Pollfield settings: explained at Pollfield book
  11. IMPORTANT: “Global settings”-> required (so that you cannot accidently create a poll node without an actual poll)

  12. SAVE!

You have just created an independent content type for polls. You may customize it by adding other fields. Do not forget that you can control the display settings at system path: admin/content/node-type/poll/display.

B. Using this content type:

  1. Put your question into the question field (this is the title field you just renamed)
  2. Use the body field for explanations or leave it blank
    • The important settings are under “Pollfield settings”
    • If you don’t want to repeat the question put ‘ ‘ into the question field (with a blank between the dashes)
    • Status: Active - poll is available for voting
    • Duration: As you like - how long poll will open for voting
    • Anonymous voting: As you like - how you want to treat anonymous user
    • Cancel Vote: As you like - disable or enable cancel vote button
    • Show results before voting: As you like - enable or disable users to see results before voting
    • Poll type: As you like - using multi choice or single choice poll
    • SAVE!

Comments

verta’s picture

Step #2 Enter a name: Poll

This might fail if the core Poll module enabled, as there is already a Poll content type.