Form style tags

As you read this section, you may want to open the Standard_ template and View its Source.

Tag Replaced with
The following tags take their values from the Setup / General settings and Setup / Visual Editor pages.
[/polltitle] The questionnaire title
[/pollheader] The questionnaire header
[/pollfooter] The questionnaire footer
[/allquestions] [/endallquestions] All HTML between these tags will be repeated, once for each Question. [/allquestions,noinclude] is used to ignore Question Styles.
[/qtext] The question's full text
[/qname] The question's name
[/ifqhelp][/endifqhelp] The HTML between these tags, when question help is checked.
[/qhelpmarker] The question help indicator, which defaults to [?]
[/qhelp] The question help text
[/qtype] The question's type.
Between the allquestions and endallquestions tags, the following tags take their values from each answer to the current question, as defined in the question page.
[/atext] The answer's full text
[/avalue] The answer's value
[/aordinal] The answer's ordinal number, starting with 1
The following tag pairs describe what HTML to use for each different question type:
[/radio] [/endradio] For radio buttons
[/checkbox] [/endcheckbox] For check boxes
[/menu] [/endmenu] For drop-down menus
[/text] [/endtext] For single-line text fields
[/twidth] The width of a single-line text field. Default is 15.
[/tmaxsz] The maximum number of characters allowed in a text field. Default is no limit.
[/mtext][/endmtext] For multi-line text fields
[/tacols] The width of a multi-line text field. Default is 15.
[/tarows] The height of a multi-line text field. Default is 4.
[/hidden][/endhidden] For hidden fields
[/ltext][/endltext] For HTML fields
[/qname] Used to compose the destination anchor for skipping functionality.
[/qnamejs] Same as qname, but without using special characters
[/ifother][/other][/endifother] When other is checked, the text of the Other field
[/allanswers] [/endallanswers] Everything between these tags will be repeated for each Answer to the current Question.
[/thisanswer] [/endthisanswer]
The [/nextanswer] tag moves to the subsequent answer in an [/allanswers] loop. Everything between [/thisanswer] and[/endthisanswer] is expressed for the current Answer; if there are no more answers, nothing is shown. These three tags together are useful in multiple-column layout voting forms.
The following tags are used between the above pairs, as appropriate, to provide default choices:
[/checked] "checked"
[/selected] "selected"
The following tags are used in each question to provide skipping functionality.
[/qskipper][/endqskipper] Delimit HTML used to skip to a question
[/qskipto] The name of the question to skip to.
The following tags provide automatic question numbering:
[/qnumbering] [/endqnumbering] The enclosed content will be expressed if automatic question numbering is enabled.
[/qno] The question number
The following tags link the voting form to other parts of the voting system.
[/vwfservlet] ViewsFlash servlet URL
[/cmd] The ViewsFlash command that will be used to process this voting form.
[/pollid] The unique ID of the poll to which this vote will be posted. Defined in the place as the Poll Name.
[/allalphapollid] The pollid without special characters, such as !
[/results] The location of the Response Style template to be used for composing the response page when a visitor submits his vote. See also the note on the Results Parameter
[/statusmsg] When a visitor submits a completed voting form, if some fields which are required are missing, the voting form can be redisplayed using this template. This field will be replaced by the message specified in the Security page.
[/dataerror] Used with statusmsg, above. When an incomplete form is received, this tag will be replaced by the indicated string, typically a pointer such as =>. This tag should be placed next to statusmsg above and also right before each question, so it can point to the questions that need answering.
[/origanswer] Used with statusmsg, above. This tag must be placed in the value parameter of the [/text] section, and as the displayable text for the [/mtext] section above. When a visitor submits incomplete data, these tags allow the display of their answer to questions of these types. Other question types do not use this tag.
[/vfonclick] [/endvfonclick] Used around JavaScript used to skip between questions and to prevent selecting both a choice and a write-in value. If neither of these is used, all text between these tags is removed.
[/ifonclick] [/endifonclick] If any question uses [/vfonclick], the JavaScript bracketed between these tags will be included; otherwise it is removed.
[/ifremaining,UNIT,OP,value] [/endifremaining]

Provides a way to show, live, the remaining amount of time still open to vote in a poll or survey.

UNIT is "days", "hours", "minutes", "seconds". OP is one of "eq", "le", "lt", "ne", "gt", "ge".
The HTML between these tags is shown only when the remaining unit of time has the indicated relationship to the value.
For example, [/ifremaining,minutes,gt,1] will show until the last minute before the polls close.

To test if a poll is closed, use [/ifremaining,seconds,eq,-1].
To test for a poll that is open without a closing time, use [/ifremaining,seconds,eq,-2]


UNIT is "days", "hours", "minutes", "seconds". Shows the specified units of time. For example, [/remaining,minutes] will show a number between 0 and 59. Combined with [/ifremaining], above, virtually any type of countdown display is possible.

These tags can also be used in response pages.

[/extra0] through [/extra9] When a question uses Extra fields, these tags display as their content, which are typically names of image or multimedia files.
[/charsetname] Contains the character set specified in the Language page.
[/thispagenumber] The number of the page currently shown while taking a survey, beginning with 1.
[/numberpages] The number of pages in the survey.
[/percentcomplete,scaledto] The percentage of the survey which has been completed, scaled to the given number, when present. This allows constructing a progress bar of a known maximum size. If scaledto specified, the number starts at 1 rather than 0.
The last page in a survey will have a number less than 100.
Provides a way to show something, like a progress bar, depending on whether a survey is on multiple pages. Use [/ifmultipage,not] to see if a survey is all on one page.
[/lookupi18n,xxx] This tag will be translated using the contents of the appropriate file in the WEB-INF/classes/com/cogix/vwflanguage directory. The English file will be used by default. If the pollid ends in __xx (two underscores and a two digit language code, such as __fr), then will be used to look up French.
See Internationalization.
[/lookupi18n,languagei18n] A special form of this tag returns the suffix of the pollid, such as fr. This can be used to localize elements such as image references, such as img src="Next[/lookupi18n,languagei18n]].gif", which will refer to Next.gif and Nextes.gif for an English and a Spanish questionnaire.
[/taglang] The language field in the Language settings page
[/tagdir] Replaced with dir="rtl" when right-to-left is set in the Language settings page

Additional results parameter values

Normally, this field contains the [/results] tag, which ViewsFlash replaces with the file name of the response page template it creates. In certain special situations, you can hand-code this field with the following values:

Content Meaning
page.html or dir/page.html Use this specific response page, relative to the root directory of the ViewsFlash web server. Always use / for directories. Do not use a leading /.
/dir/page.html, or C:\dir\page.html Use this specific response page, at the file system location specified by this absolute path (as opposite to a relative path, above). Use leading / for Unix and leading C:\ for NT (or whatever drive letter is appropriate).
http://domain/page.html Use the response page at this absolute URL. This allows for the results template to be on a different machine. Even though the http request is cached, it is not as fast as specifying a file (which is also cached).
=text Use "text" as the response template. You can use ViewsFlash tags in the text. An easy way to test things.
?url Redirect to this page after processing the vote. For example, ? displays the Yahoo home page after voting.

Custom Tags

As you examine the template, you will see that it uses [/custom] tags, described below, and that it has an architecture of nested embedded tags. This structure allows it to be used with all question types. If you create a template with certain sections removed, such as the [/mtext] section, then the template cannot be used with polls that ask that type of question. Generally, it's best to minimize the amount of change in the templates.

Next: Multiple page tags