[pmwiki-users] fun with forms

Patrick R. Michaud pmichaud at pobox.com
Thu Apr 19 17:58:44 CDT 2007


On Thu, Apr 19, 2007 at 03:21:04PM -0500, Jon Haupt wrote:
> On 4/19/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> >See the example I just added to the bottom of
> >
> >    http://www.pmwiki.org/wiki/Cookbook/SimpleRating
> >
> Oh wow, excellent!
> 
> Well, you're probably way ahead of me and already working on this or
> something, but it seems to me this would work out very nicely for the
> rating system itself - if, for example, you were able to append
> information entered in the form somewhere instead of replacing PTVs.

Well, the part I just demonstrated is really for replacing PTVs --
inserting/appending is going to require something different.

> ... I'll bet with a simple 1-5 star-based rating
> system you could just somehow change a PTV to itself + whatever was
> posted to the form and then display a rating based on the average of
> what's currently there.  

While it certainly _could_ be done this way, the opinions I've
been hearing about rating systems have indicated that a 
one-dimensional rating system isn't likely to be useful here.  
A few people have expressed strong opinions that if there's not a 
way to tie ratings to individual comments, or provide multiple 
rating dimensions, then we'd be better off without any sort of
rating system.

So, appending to a page text variable is a great approach,
but there are a lot of people who are against it.

The approach I'm currently planning to use is to put the 
ratings as comments to be added to a page -- something like:

    Name: [________]   Rating: Low ( ) ( ) (*) ( ) ( ) High
    Comments: [____________________________________________]
    [ Post ]

When someone hits Post, it inserts text into the page based
on the fields:

    * {$$name} {$$rating}
    --> {$$comments}

and if {$$rating} from the form consists of text values like
"+1", "+2", ... "+5", then it all just works without someone
having to edit the page.

That's the current theory, at any rate.

Pm



More information about the pmwiki-users mailing list