VOTE{ attributes } -- define a poll in a TWiki topic.

  • The following standard attributes are recognized
    NameSorted ascending Description Example
    bayesian If set to "on", rating averages will be computed using the Bayesian average of this item against all the other items that have the same item in their stars field. This requires all the participating %VOTEs to be global, or to save their results to the same place using saveto. See http://www.thebroth.com/blog/118/bayesian-rating for more information about Bayesian rating. bayesian="off"
    chartN Defines the format of a single bar in the results bar chart generated for the corresponding select (for select type only). See formatting results, below. chart="<p>$option $score</p>"
    descN Longer free-form description of the form field. Use this to describe the fields in a more prosaic way, or because you want to change a fieldname halfway through a survey. desc4="Please leave any remarks you might have"
    enabledN This is a logical expression that determines if this field is available. enabled2="$ WIKINAME='TWikiGuest'"
    formatN Defines the format of the results display. See formatting results, below. format="$large"
    global If set to "off", this makes the id local to this topic (the default). If set to "on" it will be a global poll that can be accessed from many topics. global="on"
    heightN Only for textboxN, number of lines in the textbox height4=5
    id The identifier of the poll. You can have multiple independent votes in the same topic. id="Dining"
    open If set to "off" this is a closed vote. If set to "on" it is open (the default) open="on"
    optionsN Each selectN must have a corresponding optionsN that defines a comma-separated list of the options that can be selected between. options1="Beer,Wine,Milk"
    saveto If set to the name of a topic, the poll results will be appended to the end of that topic. The results are formatted as a TWiki table for easy post-processing. saveto="Main.VoteResults"
    secret If set to "off", then the database will record who voted. If set to "on", votes are secret (the default) secret="on"
    selectN Defines the name of a select vote, where you select one from a ranges of options. N is a number that identifies this item within the poll e.g. select1, select2 etc. You must number all select and stars parameters uniquely and sequentially (e.g. select1 stars2 select3 select1="Drink"
    separator Defines the string to be used to separate each row in the result. separator="<br/>"
    starsN Defines the name of a rate vote, where you rate something by giving it a number of stars. N is a number that identifies this item within the poll e.g. select1, stars2 etc. You must number all select and stars parameters uniquely and sequentially (e.g. select1 stars2 select3 stars2="Usability"
    submit If set to "off", this makes the %VOTE display the results of the vote without prompting for any input. This is useful when - for example - you want to show the results of a global vote, without permitting more voting.
    textboxN Free-form block of text. Use the widthN and heightN parameters to determine the size textbox4="Remarks"
    textN Free-form line of text. Use the widthN parameter to determine the length. text3="Remark"
    widthN Each starsN must have a corresponding widthN. This gives the number of stars to show e.g. width1="5" will show 5 stars. width2="10"
    {select,stars,text,chart}format Defines the default format for fields of the given type selectformat="| $desc | $prompt | $bars |"

Topic revision: r0 - 2007-06-22 - TWikiContributor
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 1999-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors. <br /> Ideas, requests, problems regarding lt;nopgt;TWiki? lt;a href='mailto:twiki-admin@kcl.ac.uk?subject=TWiki%20Feedback%20on%20TWiki.VarVOTE'gt;Send feedbacklt;/agt; <br /> Note: Please contribute updates to this topic on TWiki.org at <a href="http://twiki.org/cgi-bin/view/TWiki/VarVOTE" target="twiki.org">TWiki:TWiki.VarVOTE</a>.