Response style tags

As you read this section, you may want to examine the Results style in a separate window and View its Source.

Tag Replaced with
[/statusmsg] Used by ViewsFlash for designer error messages.
[/pendingerror] Used by ViewsFlash for Visitor Error messages such as "you have voted twice".
The following tags take their values from the Design Response Page screen:
[/reporttitle] Report's Title
[/reportheader] Report's Introductory text
[/reportfooter] Report's Closing text
[/allquestions] [/endallquestions] All HTML between these tags will be repeated, once for each Question.
[/qtext] The question's full text
[/qname] The question's name
[/allanswers] [/endallanswers] All HTML between these tags will be repeated, once for each Answer to the current Question.
[/valuelist][/endvaluelist] Instead of [/allanswers], these tags use the actual values entered in voting forms, but can only express the Individual Field tags (see below).
Between the allanswers and endallanswers tags, the following tags take their values from each predefined Answer to the current question
[/atext] The answer's full text
[/avalue] The answer's value
The following tag pairs describe what HTML to use for each different question type:
[/ashowpctbar] [/endashowpctbar] HTML in between will be used only when "Display Percentage Bar" is chosen.
[/ashowpct] [/endashowpct] HTML in between will be used only when "Display Percentage" is chosen.
The following tags are replaced with the tags shown, when the corresponding fields in the Design response page screen are checked. See Individual Fields tags for the meaning of the tags and ^ and *.
[/acount] [/^,count,*]
[/apct] [/^,xpct,*]
[/aavg,DD,MM] [/^,avg,,DD,MM] (DD and MM are optional)
[/arank] [/^,rank,*]
[/aprevrank] [/^,prevrank,*]
[/apctbar] <img src="/viewsflash/pixelBlue.gif" height="10" width="<vwf=fieldname,pct,fieldvalue>">
Individual Fields in response pages
The following Individual Field tags are replaced as follows.
^ The current Question Name, when used between [/allquestions] [/endallquestions] or [/talliedlist] and [/endtalliedlist].
[/fieldname] The current question name.
* The current value, when enclosed between [/allanswers] and [/endallanswers], or [/valuelist] and [/endvaluelist]
In the following descriptions of additional Individual Fields, we use as an example a Question named "Party", with values of "Democrat" and "Republican"
[/Party,count,Democrat] How many people chose Democrat as the answer to Party.
[/Party,pct,Republican,SS] The percentage of visitors who answered Republican to the question Party. Scaled to the number SS (if that parameter is present). Always rounded up, never less than 1. This is the best tag for scaling images. If SS is less than 0, then it is interpreted as the number of decimal places to show instead of a scaling factor.
[/Party,xpct,Republican,SS] The percentage of visitors who answered Republican to the question Party. Scaled to the number SS (if that parameter is present). Never rounded, can be 0. If SS is less than 0, then it is interpreted as the number of decimal places to show instead of a scaling factor.
[/Party,negpct,Republican,SS] Same as pct, but subtracted from 100.
[/Party,pctq,Republican,SS] Same as pct, but calculated against the number of people who answered the question, rather than the total number of voting forms received. Can be zero. If SS is less than 0, then it is interpreted as the number of decimal places to show instead of a scaling factor.
[/Party,pct100,Republican] Same as pctq above, but manipulates percentages so that they add up to 100 for a given question. Can be zero.
[/Party,rank,Democrat] The rank of people who voted Democrat in question Party (1,2,3,etc.)
[/Party,prevrank,Democrat] The rank of people who voted Democrat the last time the "Set Rank" operation was used.
[/QuestionName,avg,DD,MM] The average of the answers to the question; only meaningful for numeric values. If DD included, show DD decimal places. If MM is included, all results are multiplied by MM.
[/QuestionName,value,*] Displays the current answer's value.
[/QuestionName] The value that a visitor entered for this question in a vote, such as their name.
[/QuestionName,enteredanswertext] The full text of the answer chosen by the visitor

[/ifmeasure,QuestionName,Answer,
MM,OP,value] [/endifmeasure]

MM is "rank" or "pctq". OP is one of "eq", "le", "lt", "ne", "gt", "ge".
The HTML between these tags is shown only when, in QuestionName, the Answer's rank or percentage has the indicated relationship to the value. Use * for the current answer. For example, [/ifmeasure,Party,*,rank,eq,1] will only show the top-ranked party.
[/ifresponded,QuestionName,Answer] [/endifresponded]

The HTML between these tags is shown only when the visitor responds Answer to QuestionName. For example, [/ifresponded,Party,Democrat] for the people [/endifresponded] will display "for the people" only for those who marked Democrat for their Party. ^ and * may not be used.

When Answer is omitted, as in [/ifresponded,QuestionName]...[/endifresponded], then the actual content entered by the respondent is displayed.

[/ifdefault,QuestionName,Answer,X] [/endifdefault]

If the fourth parameter X is missing or 1, the HTML between these tags is shown only when this Answer is the default answer to this question. If the fourth parameter is 0, the HTML is shown when this Answer is not the default answer to this question.

[/ifremaining] [/endifremaining] [/remaining] These tags, dealing with the time remaining until a questionnaire closes, are also available in questionnaire pages. They are described in Form Style Tags.
[/extra0] through [/extra9] When a question uses Extra fields, these tags display as their content, which are typically names of image or multimedia files.
[/QuestionName,answerextra,Answer,N] N is a number between 0 and 9. Displays the extraN field associated with the Answer to the QuestionName. For example, [/Party,answerextra,Democrat,0] will display the "extra0" field, which might be "donkey.gif". This tag is automatically created by the [/extraN] tags.
[/QuestionName,ordinalentry,Answer] The ordinal number of Answer in question QuestionName, starting with 1. Can also be used as [/^,ordinalentry,*]
Additional tags:
[/pollcount] Total number of responses received
[/ifpollcount,N] [/endifpollcount] Until the number of responses received reaches N, show nothing. Above that, show the HTML between these tags, usually [/pollcount].
[/ifpollcount,N,M] [/endifpollcount] Show the HTML between these tags when the number of votes cast is between N and M, inclusive. More than one set of these tags can be used.
[/pollcolor,CC,DD,EE,...] Rotates between strings CC,DD,EE, during iterations among answers. Usually used for changing color bars.
[/randomnumber] Generates a random integer such as 45521. Useful for ad engine URLs.
[/starttime] Date and time questionnaire opened
[/currenttime] Current date and time
[/datenow] Current date
[/timenow] Current time
[/elapsedtime] Days and hours questionnaire has been opened
[/pollstatus,code,message] If the status of this questionnaire matches number "code", display this message. Only meaningful when using the cmd=getresults API.
[/charsetname] Contains the character set (charset, encoding) specified in the Language page.
avaluex, atextx, qtextx, qnamex, allquestionsx, endallquestionsx Same meaning as the corresponding tags without "x", but values are shown regardless of the settings on the Response page.

Custom Tags

In addition, Form and Response templates can be extended with Custom Tags. By using these, it is possible to let the Editor who creates the questionnaire determine the look and feel of those attributes you want to let them have control of, such as the font color or size, for example.

The special {/ syntax

When you study the templates, you will find an occasional set of tags like this one found in the XtabReport style:
{/[/depqname,force],count]

To understand how this works, keep in mind that a results template is first interpreted when the questionnaire is Published. At that time, the {/ sequence is translated into [/ and [/depqname,force] is interpreted to its meaning, which in this case is the name of the dependent question being analyzed; if that were "performance", for example, then the tags would now look like this:
[/performance,count]

So, simply put, use {/ when you want a tag to be interpreted after Publishing rather then before.

Next: Archive style tags