Home

Primary links

  • top o the deck
  • Drupal for Beginners
  • about
  • links
  • give me some sugar

Drupal stuff

  • EDAM
  • STARDOM
  • Question Bank
  • Drupal musings
  • Drupal tips
Home

Key stuff on this site

Easy Drupal Admin Manual (EDAM)

SEO, Traffic and Revenue: Drupalace's Online Manual (STARDOM)

Drupal for Beginners

Subscribe to posts by RSS or email

Subscribe to Drupal Ace by RSS feed RSS feed 

Subscribe to Drupal Ace by Email

Donate towards my web hosting bill! Get a great host!

Share and save

Share/Save

Random piece of content

2008 is here: the Drupal Ace to-do list

Manuals on this site

  • Easy Drupal Admin Manual (EDAM)
    • Welcome to Your Site
    • First Steps: Please Read!
      • Understanding These Instructions
      • Important Terminology!
      • Best Practices for Site Admins
    • Super Quick Guide (for the experienced and the brave)
    • Logging In
    • Your Administrator Tools
    • Setting Site Basics
      • Setting Site Information
      • Configuring Your Theme
    • Creating Content
      • Node Types
      • Create a Page Node
      • Create a Story Node
      • Create a Blog Entry Node
      • Making Images and Other Files Available
      • Using Text and Image Editors
    • Organizing Your Content
      • Terms, Vocabularies, and Taxonomy: "Tagging" Your Content
        • Taxonomy Suggestions
      • Menus, Links, and Paths: Navigating the Site
        • Content Paths and URLs
        • Creating Links
        • Working with Menus: Administration Form (Drupal 6)
        • Working with Menus: Administration Form (Drupal 5)
        • Creating Menu Items on the Fly
        • Placing Menus on Your Pages
      • Placing Content on pages
        • Creating a page from a Single Node
        • Creating a page from a List of Nodes
        • Setting the Front Page
      • Working with Blocks
    • Maintenance Stuff
      • Maintenance and Construction Notices
    • Other Fun Things
      • Changing Color of Garland Theme
      • Free Aliases!
  • SEO, Traffic and Revenue: Drupalace's Online Manual (STARDOM)
    • Set a Clear Goal
    • Make a Good Site
      • Put out the Welcome Mat
      • Make Great Content
      • Build a Great Brand
      • Make Navigation Easy
      • Tune Site Performance
    • Drive Traffic
      • Promote your Site
      • Get Found with SEO
    • Build a Community
      • Build an Offsite Community
    • Monitor and Improve
    • One-Page Checklist
    • Drupal and the Blogging Starter Checklist
      • Drupal and the Blogging Starter Checklist, Part 1
      • Drupal and the Blogging Starter Checklist, Part 2
      • Drupal and the Blogging Starter Checklist, Part 3
      • Drupal and the Blogging Starter Checklist, Part 4
      • Drupal and the Blogging Starter Checklist, Part 5
      • Drupal and the Blogging Starter Checklist, Part 6
      • Drupal and the Blogging Starter Checklist, Part 7

Recent comments

  • It worked

    adding $GLOBALS['tempUser'] = $user; worked but I find it worth noting that I had to delete...

  • very good document...

    very good documentation for beginners!!!!!! thanks!!

  • del penitential 62

    strike out abject
    eliminate penitent 5

  • Chat

    Thank you a lot about very beneficial to my work was very useful thank you

  • Drupal Resources f...

    I would start learning from the "Diving In" section above. That links to the good beginners'...

more

What are general methods to enable fields for input by visitors?

Submitted by Drupalace on Thu, 2007-12-06 12:45
  • Drupal
  • questions
  • unanswered question

Drupal's many node types are great for making all kinds of content, and CCK multiplies the possibilities many times over.

One thing I can't quite grasp, though: Is there some general, built-in method for enabling individual fields that allow visitors to input data?

To clarify that, let me first note what I'm not talking about:

1) Not input of full nodes by users. That's all easy and understandable.
2) Not comments. That's a known and easy way to allow input by visitors, but I'm looking for actual fields.
3) Not addition of regular fields via CCK. Whatever the field type, CCK allows input into the field by the node author, yes, but not by other visitors.
4) Not (only) polls or ratings widgets. As I understand it, these allow multiple visitors to input data related to a node, which is on the right track, but such data is limited only to radio button-style selection from choices (whether poll choices or number of rating stars).

What I'm looking for is fields allowing flexible input of data. "Flexible" may or may not be restricted by user permissions, by length limitations, etc., but exact restrictions are a secondary concern for now.

With valid input, each node would have multiple values associated with it for that field (perfectly possible technically, I assume, as a node can have multiple comments associated with it). It would then be possible to manipulate those fields: list them, average them (if numbers), etc.

Examples of possible uses might best illustrate my wish:

a) Allow registered users to freely enter guesses in a contest. A site admin could look at the list of input guesses, and determine the winner.
b) Allow multiple instances of a ratings widget (such as three separate instances of the same ratings widget, each rating some different aspect of the node's content).
c) Allow polls or multiple-choice questions with open-end "Other" selections. (You can of course create "Other" as a poll selection, but I don't know any way to enable "Other (please describe)", followed by a field for input of the "please describe" response.

This is a follow-up to my question at http://drupal.org/node/191680 . That request targeted a couple of special situations involving ratings; here I'd like to ask more broadly about general methods for a wider range of uses.

Thanks in advance for help! This issue is important for a client's site, and I would think is of interest to many Drupal users. I've been scouring the forums and modules, without any clear solutions yet. I'll be happy to review and summarize any info received, in this thread and on my site.

Related URL: 

http://drupal.org/node/194932

Share/Save
  • Printer-friendly version
Sam's picture

Duplicate blog...

Submitted by Sam (not verified) on Thu, 2009-07-30 19:59.

Heyyaa.... jus saw a very same blog somewhere else too !!! guess somebody's been copyin ur stuff...

  • reply
qchan's picture

hello

Submitted by qchan (not verified) on Wed, 2009-07-01 11:19.

I am seraching a same solution. But i don't find it yet.

I think you have already knew [Node comments] module.

http://drupal.org/project/nodecomment

 It doesn't input field in contents, but CCK is ready.

do you think it is useful?

 

  • reply
Drupalace's picture

User-input fields

Submitted by Drupalace on Wed, 2009-07-01 15:26.

Hi, qchan! I've read about the Node Comments module, but haven't used it. On the surface, I don't think it directly addresses what I am looking for.

(Side info: Some newcomers to Drupal might not be aware of this, but while a comment looks like a "piece of content" and thus a node, it actually isn't a node; rather, it's stored as part of the parent node. I don't know the full implications of this, but it's my understanding that it limits the way comments can be listed or otherwise acted upon, compared to full nodes.) 

Node Comments, as I understand it, will use full nodes for comments, allowing more detailed operations on them. That sounds good for some purposes, but I'm looking to enable fields that allow user input. Voting functions are a good example: a rating field accepts input from any number of users, storing the multiple instances of input together with the node. (I guess the existing comment system works like this too.) I'm wondering whether there's some generic method of adding yet more fields like that. 

I think my original interest in this topic involved creation of nodes that allowed voting on multiple items – i.e., nodes with any number of voting (or rating) parameters. I still don't know how that can be done. Let's find some way!

  • reply
qchan's picture

うーん

Submitted by qchan (not verified) on Thu, 2009-07-02 12:43.

ごめんなさい、ちょっと話が入り組むと英語がまだ難しいので日本語で書きます。

 

Node commentsを使ってユーザーに入力させることは出来ると思うんだけどなぁ。

Node commentsのFieldはCCKで自由に設計できるから、Checkbox+textfield, とかSelect boxでもfivestarでも付けられるはず。

管理用にViewsでの一覧も出来たので便利だなと思ってました。

そのままだと、全員に投票結果が見えてしまうのは、defaultではcommentをmoderationしない方法で解決できないですか?

 

 

これは違うmoduleですが、面白い使い方をしている人がいましたよ。

Submenu Tree のReview

http://drupalmodules.com/module/submenu-tree

いろいろなNodeに一つのPollをくっつける使い方を考えたそうです。複数のPollを付けることも出来そうですよ。

 

 

  • reply
Drupalace's picture

Node commentsを試してみたが。。。

Submitted by Drupalace on Mon, 2009-07-06 12:19.

(English follows Japanese at end of comment)

追加情報をありがとう。是非使ってみたく、Node commentsをインストールしみたが、エラーメッセージばかりが出てしまった。

  • warning: Invalid argument supplied for foreach() in /xxx/sites/all/modules/views/includes/query.inc on line 918.
  • warning: Invalid argument supplied for foreach() in /xxx/sites/all/modules/views/includes/query.inc on line 893.
  • warning: Invalid argument supplied for foreach() in /xxx/sites/all/modules/views/includes/query.inc on line 918.
  • user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM comments comments WHERE .status <> 0 OR (.uid = 1 AND 1 <> 0) OR 1 = 1 ' at line 2 query: SELECT COUNT(*) FROM (SELECT FROM comments comments WHERE .status <> 0 OR (.uid = 1 AND 1 <> 0) OR 1 = 1 ) count_alias in /xxx/sites/all/modules/views/includes/view.inc on line 729.
  • user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM comments comments WHERE .status <> 0 OR (.uid = 1 AND 1 <> 0) OR 1 = 1 ' at line 2 query: SELECT FROM comments comments WHERE .status <> 0 OR (.uid = 1 AND 1 <> 0) OR 1 = 1 LIMIT 0, 5 in /xxx/sites/all/modules/views/includes/view.inc on line 755.

アンインストールしたら運良く直った。

今度お会いできたら、使い方についてもっと教えてください!よろしくお願いします。

別件で、Submenu Treeは本当に面白そうです。どこかで使えるか、今考えています。。。

I wanted to give the Node Comments module a try as qchan suggested, seeing whether it can be used to apply user-input fields into a node. It sounds promising - but unfortunately, installation of the module churned out the above error messages for me. Uninstallation cleared things up.

I think I'll have a chance later to pursue this with qchan, so will report if there's progress. 

Separate from that, qchan notes that the Submenu Tree module looks interesting, and I agree. It might be a great way to "attach" polls or other input-type tools to a node, possibly addressing the initial questions I had. I'll look into that. 

  • reply

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><br><p>
  • You may quote other posts using [quote] tags.
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options


Relevant Content

The Drupal Ace logo has dealt these content suggestions from the deck.

  • Working with Menus: Administration Form (Drupal 6)
  • How to encourage readers to share content?
  • How to display message (NDA, warning, etc.) before content can be viewed?
  • What options to check when exporting database from phpMyAdmin?
  • Why doesn't Google web search work?
  • How to change page layout for newbie vs superfan visitors?
  • How to handle bullet indentation in Garland theme's style.css?

Learn Drupal, hands-on

Get the beginner-friendly ebook that teaches community site building via a live case study.

Drupal 6 Ultimate Community Site Guide

Read the review

Drupal mini tip

Site visitors seeing your ugly error messages on the screen (along with details of your Drupal installation path)? Once your site goes from dev to launch, you probably want to have errors recorded in the log but not splashed across the screen. Head to the handy Error Reporting settings found at admin/settings/error-reporting. 

It's a deal!

Dreamhost dealsDrupal Ace presides over his domain, proudly ensconced in his DreamHost eyrie. Won't you join me?

Promo code deal!

Just enter the code 49ER when you register for an account, and save $49 off the already-low price. No strings!

Read my hosting service review

Powered by Drupal, an open source content management system

Copyright 2007 and forever after. Made with Drupal, of course. On OS X, of course. Served up by DreamHost. DreamHost

RoopleTheme