These criteria are exactly the same criteria used in the "Required" answer check input type.
A survey subsection can have many conditional surveys. If the respondent's answers do not fulfill those conditional surveys criteria, then non of those conditional surveys are invoked. Instead either the next survey subsection (if any) is invoked or the survey ending text ( either the master survey's end text or the default end text) is displayed. However if the answers do satisfy a subset of the conditional surveys, then all survey questions for those conditional surveys are displayed to the respondent as another survey to fill out. The displayed order for the sets of conditional survey questions is determined by the order of the Conditional Survey questions in the survey subsection. This will be discussed in greater detail in the following section. When you use Dump Master Survey to dump a survey subsection, all the questions from the conditional surveys that the survey subsection owns are appended to the end of the questions from that survey subsection.
Survey owners must use the following guidelines to set up conditional survey processing for a survey subsection. First the owner must use Conditional Survey Editor to create the conditional surveys for that survey subsection. Next the owner use the Survey Question Editor to create and edit Conditional Survey Questions for that survey subsection. It is important to note that unless the survey subsection has conditional surveys, the Survey Question Editor will not display the options to create and edit Conditional Survey Questions. Use the appropriate conditional survey question option to create a Conditional Survey Question. You should create the Conditional Survey Question immediately after the question with which you want to check the response of. You are actually allowed to put comment type questions between a conditional survey question and the question to check. The key is you can not place a question which has an input field between a conditional survey question and the question to check. The Conditional Survey processing will assume that question is the question to check. There are only two required fields for a Conditional Survey Question: the matching response text and the conditional survey to invoke when the matching criterion for that text is satisfied. The criterion is determine by what is specified as the matching response text. To specific the not equal comparision, use the "^" tag. For example, the question text "^5" means see if the answer from the previous question is not equal to 5. To specific the not null comparision enter the not null tag "Not_Null" as the matching response text. This means see if the user has responded to the previous question. To specify the conditional survey, select the desired conditional survey from the conditional survey list. You can change these values with the usual "Edit" option in the Survey Question Editor. The order of these Conditional Survey Questions determine the display order of survey questions of invoked conditional surveys.
To see how conditional survey processing and Required answer check works , you can take the demo survey
Required And Conditional Demo.
You can take this survey multiple times and see what happens when you enter different responses.
The Examine Survey tool allows the survey owner examine a master survey with the actual responses filled in. In the Examine Survey tool, the survey owner selects a master survey and optionally inputs a "After" date and a "Before" date. If no dates are specified then the tool retrieves all the response sequence numbers corresponding to all survey responses currently stored in the database. If any of the date input fields are specified, then the tool only retrieves the response sequence numbers that correpond to survey responses that were entered within the date limits. If the master survey requires authentication, then the full name and netid are also retrieved. The tool generates a scroll list of responses with each response consisting of three parts a Sequence Number, an IP Address, and and a Date. If the master survey requires authentication, then the respondent's Full Name and netid are appended to each response. If the master survey has more than one survey subsection, the survey owner must select the survey subsection to examine. If any survey question has conditonal surveys, the questions corresponding to those conditional surveys are appended to the end the survey. The survey owner then selects from the response list the actual survey response to examine.
The Tabulate Survey tool allows the surve y owner to tabulate and graph the responses for a survey question for which a user selects one or more choices ( i.e. radio butto ns, checkboxes, and scroll selections). The survey first select a survey subsection and then select a question from that survey subsection. The user can optionally spec ify a date filter for the tabulation. The tool will then tabulate the responses with the answers ordered by count. Here is a sa mple tabulate survey result:
| Question You machine is a | |
| PC | 126 |
| MAC | 61 |
| Work Station | 32 |
| Other | 27 |
After the tabulation, the survey owner can generate bar graphs of the tabulated results. The bar graph will display the numbe rs in decreasing value, from the highest to the lowest. The X-axis labels will correspond to the choices. The graph title will be the survey question. The survey owner can customize the graph by specifying separate colors for each bar, a different title f or the graph, and spacing between the bars.
The Tabulate Survey tool now allows the survey owner to optionally tabulate a question for responses that matches answers from
another survey question, the Dependent question. The Dependent question can come from either the same survey subs
ection or a survey subsection which is before the question to be tabulate.
Note the the Dependent question itself must be a question which also can be tabulated (i.e., radio buttons, checkboxes, sc
roll lists and popups).
This is because the answers to be matched must be selected from list of values.
The survey system now supports the randomization of the order of questions and also the randomization of the displayed selections. For each survey question, the survey owner can set the Randomize Answers flag to determine if the displayed selections will be randomed ( note that this flag only applies to survey questions which have survey choices with list of selections).
To randomize a subset of survey questions in a survey subsection, the survey owner inserts a survey question connected to the the "Randomized Question" choice immediately before that subset of questions. For that survey question, set the value of Num Rows equal to the number of questions to be randomized.
To see how randomized questions and answers works , you can take the random answer demo survey
Randomized Demo.
In this demo, there are, there are four sections with exactly the same six questions. The first section
is not randomized. The second section has randomized questions. The third
section has randomized answers. The fourth section has both randomized
questions and answers. Everytime you take the randomized demo survey, you will see different question order in
sections two and three, different selection order in section three and four.
In a survey subsection, the automatic labeling of questions is determined by the "Want Question To Be Numbered" flag.
If enabled, the label is numeric and begins with 1 and the delimiter is the ")" character, i.e.
1)Question_Text
However, by inserting questions attached to a "Set Question Ctr" choice at the appropriate locations in the survey subsection , the survey owner now has greater flexibility in determining where in the survey question labels are used and the type of question labels.
The question text of the question attached to a "Set Question Ctr" choice provides the rules used by the automatic question label operation.
The question text can consists of up to three values with the
the format of the question text adhering to the following convention (brackets denote optionally values)
Type [starting number-1] [delimiter]
The first value is the type and this value determine the question label type.
| Valid Types | |
| Numeric | labels from 1 to n |
| Letter | Labels from a thru z, followed by aa thru az, followed by aaa thru aaz ,etc ( as needed ) |
| UpperLetter | Labels from A thru Z, followed by AA thru AZ, followed by AAA thru AAZ ,etc ( as needed ) |
| Roman | Numeric Labels converted to lowercase roman letters ,ie. 11 with be xi |
| UpperRoman | Numeric Labels converted to uppercase roman letters ,ie. 11 with be XI |
| Disable | Disable automatic question label operation. Only another "Set Question Ctr" question can re-enable the automatic question label operation |
Usually only survey creators can execute operations on survey objects that belong to the survey creator. Now by using the "Grant User Privs" option in the Master Survey Editor a survey creator can assign survey privileges to other Princeton members. The following table list the available privileges and the operations that those privileges can execute.
| Survey Privilege | Available Operations | |||
| Edit Master | Edit Master Survey properties | |||
| Edit Survey | Edit Survey properties For Surveys connected to Master Survey | |||
| Dump Master | Dump, Examine, and Get Response Count | |||
| Tabulate Master | Tabulate Master Survey | |||
Usually when a survey requires netid authentication, the survey system will authenticate the respondent netid against the Princeton database. Now survey owners can create their own authentication sources by creating Survey Password Lists with Survey Password List Editor and configuring the master survey to authenticate against a survey password list. Access to the survey password lists are restricted only to the survey owners. A survey owner can not view,edit, or delete password list that do not belong to them.
A survey password list consists of password entries which follow the convention loginname:password. For example
myname:mypassword
where the loginname is myname and the password is mypassword. The maximum length of a loginname is sixteen characters and the maximum length of a password is thirty-two characters. The loginname can only contain alphameric characters (i.e. 0-9,a-z,A-Z) and the password can not contain carriage returns or the ":" character.
Every survey password list has an encryption type. Currently only two types are supported:
As previous mentioned, survey owners use the Survey Password List Editor to create their survey password lists. There are two steps to the creation procedure. In the first step, the Password List Editor provides a form where the survey owner specifies a name for the password list, the encryption type, and a list of password entries. In this form, all the currently defined netids and loginnames ( those who have taken an authenticated survey ) and their corresponding full names ( first name, lastname and middle name ) are displayed. Note that you are allowed to use an existing Princeton NetID as a loginname in a password entry. Also if you already have a .htpasswd file, just select "Basic Authentication" encryption and copy the entire file into the appropriat textbox. After these parameters are validated, the Password List Editor displays a form which prompts the survey owner to specify a fullname for each password entry. If the loginname already exist in the system, then the corresponding fullname will be displayed. If the loginname does not exist, then the fullname defaults to Loginname loginname. The survey owner can either accept this default fullname or enter a "real" fullname.
Once a password list has been created, the survey owner uses Master Survey Editor to configure a master survey to authenticate against a password list. There are three possible authentication configuration
If the survey owner has granted edit_master privilege to other valid Princeton netid , then the survey owner can use password lists that belong to those netids for the authentication process.
If the master survey has been configured to authenticate against a password list, then the authentication proceeds as follows
1)first check against the password list that belongs to the survey owner
2)if login entry does not exist in that password list, check against the password list that belongs to netids who have been granted edit_master privilege ( if any)
If a master survey has more one than survey subsections, the survey owner can use the jumpto_survey feature to conditionally or unconditionally jump from one survey subsection to another survey subsection based on a response to a question. To use the jumpto_survey feature, insert a question with a "JumpTo_Survey" choice type after a question which has an input ( i.e. text input, radio button, checkbox, scrollable selection ). For conditional jumping, there are three possible situations:
The jumpto_survey processing now supports two new features
| Symbol | Definition |
| && | Logical AND |
| || | Logical OR |
| < | Less than |
| <= | Less than or equal to |
| > | Greater than |
| >= | Greater than or equal to |
| == | Equal to |
The above expression has three sub-expressions:
(QUEST_ID <=2)
(QUEST_ID:29003 ==2 )
(QUEST_ID:29024 <=5)
These three sub-expressions are connected by the Logical AND operators. This mean in order for the expression to be True, all three expresssions must be True. Remember, the jump will only occur when the expression is True.
Note in the sub-expressions, there are two kinds of tags specified, QUEST_ID, and QUEST_ID:number. The QUEST_ID tag is a marker to the survey system to indicate that the jumpto_survey process first substitute the response from the current question before evaluating the expression. The QUEST_ID:number tag has the a similar role except that instead of using the current question, use the response from the question with the Quest_Id value equal to the number. Note all survey questions have an unique Quest_Id number. To find the Quest_Id number for a question, you will go the
Survey Question Editor.
There is a radio option "Show QuestIds" which will display the Quest_Id number in front of each of the questions.
The expression feature provides the survey user with greater flexibility in specifying when the jump will occur. The expression can be as complicated or as simple as the owner wants. Note the expression is not required to test on the current question. To see the expression feature in action go to the JumpTo_Survey Expression Demo.
Currently, creating a survey is a multi-step process which requires the survey owner to use the various survey tools to create the various components of the survey. To facility the creation process, the survey system can accept XML (Extensible Markup Language) text as input to create the entire survey in one step( for an introduction to XML go to Introducing the Extensible Markup Language(XML) ).
The XML text input used to create the survey will be validated against the survey system DTD file<?xml version="1.0" encoding="UTF-8"?> <!ELEMENT survey_input (master_survey)> <!ELEMENT mastername (#PCDATA)> <!ELEMENT scriptname (#PCDATA)> <!ELEMENT optional_title (#PCDATA)> <!ELEMENT want_authenticate (#PCDATA)> <!ELEMENT netid_filter (#PCDATA)> <!ELEMENT authentication_text (#PCDATA)> <!ELEMENT start_text (#PCDATA)> <!ELEMENT end_text (#PCDATA)> <!ELEMENT done_text (#PCDATA)> <!ELEMENT background_color (#PCDATA)> <!ELEMENT subsectionname (#PCDATA)> <!ELEMENT disable_reset (#PCDATA)> <!ELEMENT font_type (#PCDATA)> <!ELEMENT font_size (#PCDATA)> <!ELEMENT left_margin (#PCDATA)> <!ELEMENT right_margin (#PCDATA)> <!ELEMENT question_text (#PCDATA)> <!ELEMENT answer_required (#PCDATA)> <!ELEMENT max_columns (#PCDATA)> <!ELEMENT num_rows (#PCDATA)> <!ELEMENT line_breaks (#PCDATA)> <!ELEMENT max_answers (#PCDATA)> <!ELEMENT next_row (#PCDATA)> <!ELEMENT display_submit (#PCDATA)> <!ELEMENT submit_text (#PCDATA)> <!ELEMENT value (#PCDATA)> <!ELEMENT question_list (question+)> <!ELEMENT subsection_list (subsection+)> <!ELEMENT cond_subsection_list (cond_subsection+)> <!ELEMENT display_list (value+)> <!ELEMENT store_list (value+)> <!ELEMENT randomize_answer (value+)> <!ELEMENT answer_type (value+)> <!ELEMENT cond_subsection (subsectionname,optional_title?,background_color?,disable_reset?, font_type?,font_size?,left_margin?,right_margin?,question_list)> <!ELEMENT subsection (subsectionname,cond_subsection_list?,optional_title?,background_color?, disable_reset?,font_type?,font_size?,left_margin?,right_margin?,question_list)> <!ELEMENT question (question_text,answer_required?,max_columns?,num_rows?,line_breaks?,max_answers?, display_submit?,submit_text?,next_row?,display_list?,store_list?,randomize_answer?,answer_type?)> <!ATTLIST question input_type ( PopUp | Single_Select_Scroll | Multiple_Select_Scroll | CheckBox | Row_Aligned_CheckBox | CheckBox_Per_Line | Row_Aligned_CheckBox_Per_Line | Radio_Buttons | Radio_Buttons_Per_Line | Row_Aligned_Radio_Buttons | Radio_Buttons_Reset | Radio_Buttons_Reset_Per_Line | Row_Aligned_Radio_Buttons_Reset | Row_Aligned_Radio_Buttons_Per_Line | Text_Box | Text_Line | Row_Aligned_Text_Line | Comments_Only | JumpTo_Survey | Set_Question_Ctr | Randomized_Questions | Conditional_Survey | Required_Answer_Check ) #REQUIRED > <!ELEMENT master_survey (mastername,scriptname,optional_title?,want_authenticate?,netid_filter?, authentication_text?,start_text?,end_text?,done_text?,background_color?,subsection_list)>
According to the DTD file, the survey_input element consists of one master_survey element. The following table details the elements that make up the master_survey element.
| Element | Required? | Default Value |
| mastername | Yes | None |
| scriptname | Yes | None |
| optional_title | No | None |
| want_authenticate | No | No |
| netid_filter | No | None |
| authentication_text | No | default authentication text |
| start_text | No | None |
| end_text | No | default end text |
| done_text | No | default done text |
| background_color | No | white |
| subsection_list | Yes | None |
| Element | Required? | Default Value |
| subsectionname | Yes | None |
| cond_subsection_list | No | None |
| optional_title | No | None |
| background_color | No | white |
| disable_reset | No | No |
| font_type | No | times new roman,times |
| font_size | No | 3 |
| left_margin | No | 0 |
| right_margin | No | 0 |
| question_list | Yes | None |
| Element | Required? | Default Value |
| subsectionname | Yes | None |
| optional_title | No | None |
| background_color | No | white |
| disable_reset | No | No |
| font_type | No | times new roman,times |
| font_size | No | 3 |
| left_margin | No | 0 |
| right_margin | No | 0 |
| question_list | Yes | None |
The question_list element consists of question elements. The question elements correponds to survey questions for the subsection element that contains the question_list element.
Each question elment must have an input_type attribute. This attribute determines what inputs (if any) are required for the question.
The following table lists the supported input_types.
| Valid Input_Types | Description |
| PopUp | One Selection of a value from a PopUp List |
| Single_Select_Scroll | One Selection of value from a Scroll List |
| Multiple_Select_Scroll | More than One Selection of values from a Scroll List |
| CheckBox | More than One Selection of values from a CheckBox List |
| Row_Aligned_CheckBox | More than One Selection of values from a CheckBox List which is displayed as one row aligned with inputs from the previous question This is for displaying questions with inputs in a table format |
| CheckBox_Per_Line | More than One Selection of values from a CheckBox List which is displayed as one checkbox per line |
| Row_Aligned_CheckBox_Per_Line | More than One Selection of values from a CheckBox List which is displayed as multiple rows aligned with inputs from the previous question This is for displaying questions with inputs in a table format |
| Radio_Buttons | One Selection of value from a Radio Button List |
| Radio_Buttons_Per_Line | One Selection of value from a CheckBox List which is displayed as one radio button per line |
| Row_Aligned_Radio_Buttons | One Selection of value from a Radio Button List which is displayed as one row aligned with inputs from the previous question This is for displaying questions with inputs in a table format |
| Radio_Buttons_Reset | Same as Radio_Buttons but also displayed with a Reset button to clear selcted button |
| Radio_Buttons_Reset_Per_Line | Same as Radio_Buttons_Per_Line but also displayed with a Reset button to clear selcted button |
| Row_Aligned_Radio_Buttons_Reset | Same as Row_Aligned_Radio_Buttons but also displayed with a Reset button to clear selcted button |
| Row_Aligned_Radio_Buttons_Per_Line | One Selection of value from a Radio Button List which is displayed as mulitple rows aligned with inputs from the previous question This is for displaying questions with inputs in a table format |
| Text_Box | Text Box Input field |
| Text_Line | Text Line Input field |
| Row_Aligned_Text_Line | Text Line Input field which is displayed input field aligned with inputs from the previous question |
| Comments_Only | No input or selection is required |
| JumpTo_Survey | To specify JumpTo_Survey Processing |
| Set_Question_Ctr | To specify Set_Question_Ctr Processing |
| Randomized_Question | To specify Randomized Question Processing |
| Conditional_Survey | This is a "pseudo" input_type to indicate conditional survey processing. The match string is specified by the question_text element and the conditional survey is specified by the submit_text element. See xml conditional survey example. |
| Required_Answer_Check | To specify Required Answer Check Processing |
| Element | Required? | Default Value | Valid Values |
| question_text | Yes | None | Any Text |
| answer_required | No | Yes | No |
| max_columns | No | 64 | Number >= 1 |
| num_rows | No | 1 | Number >= 1 |
| line_breaks | No | 1 | Number >= 0 |
| max_answers | No | 1 | Number >= 1 |
| display_submit | No | No | Yes |
| submit_text | No | None | Any Text |
| next_row | No | No | Yes |
| display_list | Depends on the input_type attribute | None | |
| store_list | Depends on the input_type attribute and if want stored values different from the display values | None | |
| randomize_answer | No | No | Yes |
| answer_type | No | Text | Numeric |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE survey_input SYSTEM "http://websurvey.princeton.edu/Html_Files/WebSurvey.dtd">
<survey_input>
<master_survey>
<mastername>Xml Survey Demo</mastername>
<scriptname>xml_survey_demo</scriptname>
<optional_title><center><h4>Xml Survey Demonstration</h4></center></optional_title>
<want_authenticate>Y</want_authenticate>
<authentication_text><center><h4>This xml survey demonstation is available to valid Princeton netid and Email password.</h4></center><a target="NEW" href="https://websurvey.princeton.edu">Survey Doc</a>==Go Authenticate!</authentication_text>
<start_text>Please read the candidates positions by going here <a target="NEW" href="https://www.princeton.edu/usg/">USG</a> before voting.==Go Vote!</start_text>
<end_text>Thank you for voting. To view the elections results please go here <a target="NEW" href="https://www.princeton.edu/usg/">USG</a></end_text>
<background_color>orange</background_color>
<subsection_list>
<subsection>
<subsectionname>Xml Demo Election Subsection</subsectionname>
<optional_title><center><h4>This is the election subsection</h4></center></optional_title>
<background_color>yellow</background_color>
<question_list>
<question input_type="CheckBox">
<question_text><b>Please select a Presidential Candidate</b></question_text>
<next_row>Y</next_row>
<display_list>
<value>Presidential Candidate 1</value>
<value>Presidential Candidate 2</value>
</display_list>
</question>
<question input_type="Radio_Buttons">
<question_text><i>Please select a Vice-Presidential Candidate</i></question_text>
<display_list>
<value>Vice-Presidential Candidate 1</value>
<value>Vice-Presidential Candidate 2</value>
</display_list>
<store_list>
<value>1</value>
<value>2</value>
</store_list>
</question>
<question input_type="PopUp">
<question_text><b><i>Please select number</i></b></question_text>
<display_submit>Y</display_submit>
<submit_text>Go Vote!</submit_text>
<next_row>Y</next_row>
<display_list>
<value>1</value>
<value>2</value>
</display_list>
<store_list>
<value>1</value>
<value>2</value>
</store_list>
</question>
</question_list>
</subsection>
<subsection>
<subsectionname>Xml Demo Election Polling Subsection</subsectionname>
<optional_title><center><h4>This is the election polling subsection</h4></center></optional_title>
<background_color>green</background_color>
<question_list>
<question input_type="Text_Box">
<question_text><b>Enter your comments about this election</b></question_text>
<max_columns>40</max_columns>
<num_rows>4</num_rows>
<next_row>Y</next_row>
</question>
<question input_type="Text_Line">
<question_text><i>Please enter your major</i></question_text>
<next_row>Y</next_row>
</question>
<question input_type="CheckBox">
<question_text><b><i>Please check off the Presidential Candidates you have actually meet in person</i></b></question_text>
<display_list>
<value>Presidential Candidate 1</value>
<value>Presidential Candidate 2</value>
</display_list>
</question>
<question input_type="Radio_Buttons">
<question_text><b>Please select the Vice Presidential Candidates most likely to win</b></question_text>
<display_submit>Y</display_submit>
<submit_text>Go Vote!</submit_text>
<display_list>
<value>Vice-Presidential Candidate 1</value>
<value>Vice-Presidential Candidate 2</value>
</display_list>
<store_list>
<value>1</value>
<value>2</value>
</store_list>
</question>
</question_list>
</subsection>
</subsection_list>
</master_survey>
</survey_input>
Here is the actual output from the create survey with xml text operations
| Survey URL | https://websurvey.princeton.edu/cgi-bin/xml_survey_demo.pl |
| OptionalTitle | Xml Survey Demonstration |
| Survey Done | NO |
| Netid Authenticate | YES |
| Allow Retakes | NO(With No Retake List) |
| Netid Filter | |
| Background Color | orange |
| Ip Filter | |
| Start Text | Please read the candidates positions by going here USG before voting.==Go Vote! |
| End Text | Thank you for voting. To view the elections results please go here USG |
| Authentication Text | This xml survey demonstation is available to valid Princeton netid and Email password. |
| Survey Done Text | |
| Survey Html Page | https://websurvey.princeton.edu/Html_Files/xml_survey_demo.html |
| Survey Subsection List |
| Xml Demo Election Subsection |
| Xml Demo Election Polling Subsection |
After a xml survey has been sucessfully created, the survey owner can use the various survey tools to make changes to the master survey and its associated survey objects. For some changes, it would be easier to re-create the xml survey. To facilitate this option, the survey owner can use the Remove Newly Created Xml Master Survey and Survey Objects function in the Master Survey editor to first remove the xml survey. Then the survey owner can re-submit the xml text with the appropriate changes. Note that this process of removing and re-creating the xml survey will only work if no sigificant changes ( such as adding/removing new question , adding/removing subsections ) have been made to the xml survey.
Here is another sample xml input which uses miscellaneous input_types such as Set_Question_Ctr, Randomized_Questions, and JumpTo_Survey. The bold question elements in the text contain those input types.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE survey_input SYSTEM "http://websurvey.princeton.edu/Html_Files/WebSurvey.dtd">
<survey_input>
<master_survey>
<mastername>Xml Survey Misc Demo</mastername>
<scriptname>xml_survey_misc_demo</scriptname>
<optional_title><center><h4>Xml Misc Survey Demonstration</h4></center></optional_title>
<want_authenticate>Y</want_authenticate>
<authentication_text><center><h4>This xml survey demonstation is available to valid Princeton netid and Email password.</h4></center><a target="NEW" href="https://websurvey.princeton.edu">Survey Doc</a>==Go Authenticate!</authentication_text>
<start_text>Please read the candidates positions by going here <a target="NEW" href="https://www.princeton.edu/usg/">USG</a> before voting.==Go Vote!</start_text>
<end_text>Thank you for voting. To view the elections results please go here <a target="NEW" href="https://www.princeton.edu/usg/">USG</a></end_text>
<background_color>orange</background_color>
<subsection_list>
<subsection>
<subsectionname>Xml Misc Demo Election Subsection</subsectionname>
<optional_title><center><h4>This is the election subsection</h4></center></optional_title>
<background_color>yellow</background_color>
<question_list>
<question input_type="Set_Question_Ctr">
<question_text>UpperLetter</question_text>
<line_breaks>0</line_breaks>
</question>
<question input_type="Comments_Only">
<question_text>This subsection demonstrates questions with input_types <b>Set_Question_Ctr</b>,<b>Randomized_Questions</b>,<b>JumpTo_Survey</b>.
All questions which prompts for an input will now start with a uppercase letter.</question_text>
</question>
<question input_type="CheckBox">
<question_text><b>Please select a Presidential Candidate</b></question_text>
<answer_required>N</answer_required>
<next_row>Y</next_row>
<display_list>
<value>Presidential Candidate 1</value>
<value>Presidential Candidate 2</value>
</display_list>
</question>
<question input_type="Radio_Buttons">
<question_text><i>Please select a Vice-Presidential Candidate</i></question_text>
<answer_required>N</answer_required>
<display_list>
<value>Vice-Presidential Candidate 1</value>
<value>Vice-Presidential Candidate 2</value>
</display_list>
<store_list>
<value>1</value>
<value>2</value>
</store_list>
</question>
<question input_type="PopUp">
<question_text><b><i>Please select number</i></b></question_text>
<answer_required>N</answer_required>
<next_row>Y</next_row>
<display_list>
<value>1</value>
<value>2</value>
</display_list>
<store_list>
<value>1</value>
<value>2</value>
</store_list>
</question>
<question input_type="Comments_Only">
<question_text>The order of next four questions are randomized. The next time you take this survey, the order will be different.</question_text>
</question>
<question input_type="Randomized_Questions">
<question_text>randomized next 4 questions</question_text>
<num_rows>4</num_rows>
<line_breaks>0</line_breaks>
</question>
<question input_type="Row_Aligned_CheckBox_Per_Line">
<question_text>Select At Large Representative(s)-maximum of 2</question_text>
<answer_required>N</answer_required>
<num_rows>2</num_rows>
<line_breaks>0</line_breaks>
<max_answers>2</max_answers>
<display_list>
<value>Representative #1</value>
<value>Representative #2</value>
<value>Representative #3</value>
<value>Representative #4</value>
</display_list>
</question>
<question input_type="Row_Aligned_Radio_Buttons">
<question_text>Select Recorder</question_text>
<answer_required>N</answer_required>
<line_breaks>0</line_breaks>
<display_list>
<value>Recorder Candidate #1</value>
<value>Recorder Candidate #2</value>
</display_list>
</question>
<question input_type="Row_Aligned_Radio_Buttons_Reset">
<question_text>Select Treasurer</question_text>
<answer_required>N</answer_required>
<line_breaks>0</line_breaks>
<display_list>
<value>Treasurer Candidate #1</value>
<value>Treasurer Candidate #2</value>
</display_list>
</question>
<question input_type="Row_Aligned_Text_Line">
<question_text>Enter your write-in candidate for President</question_text>
<answer_required>N</answer_required>
<max_columns>40</max_columns>
<line_breaks>0</line_breaks>
</question>
<question input_type="Comments_Only">
<question_text><br>If you answer <b>No</b> to the next question,
the <b>JumpTo_Survey</b> processing will take you to the end of the survey.</question_text>
</question>
<question input_type="Radio_Buttons">
<question_text>Do you want to answer election polling questions</question_text>
<answer_required>N</answer_required>
<display_list>
<value>Yes</value>
<value>No</value>
</display_list>
</question>
<question input_type="JumpTo_Survey">
<question_text>No</question_text>
<num_rows>1</num_rows>
<line_breaks>0</line_breaks>
</question>
<question input_type="Comments_Only">
<question_text><!--place holder for submit button--></question_text>
<display_submit>Y</display_submit>
<submit_text>Go Vote!</submit_text>
</question>
</question_list>
</subsection>
<subsection>
<subsectionname>Xml Misc Demo Polling Subsection</subsectionname>
<optional_title><center><h4>This is the election polling subsection</h4></center></optional_title>
<background_color>green</background_color>
<question_list>
<question input_type="Text_Box">
<question_text><b>Enter your comments about this election</b></question_text>
<answer_required>N</answer_required>
<max_columns>40</max_columns>
<num_rows>4</num_rows>
<next_row>Y</next_row>
</question>
<question input_type="Text_Line">
<question_text><i>Please enter your major</i></question_text>
<answer_required>N</answer_required>
<next_row>Y</next_row>
</question>
<question input_type="CheckBox">
<question_text><b><i>Please check off the Presidential Candidates you have actually meet in person</i></b></question_text>
<answer_required>N</answer_required>
<display_list>
<value>Presidential Candidate 1</value>
<value>Presidential Candidate 2</value>
</display_list>
</question>
<question input_type="Radio_Buttons">
<question_text><b>Please select the Vice Presidential Candidates most likely to win</b></question_text>
<answer_required>N</answer_required>
<display_submit>Y</display_submit>
<submit_text>Go Vote!</submit_text>
<display_list>
<value>Vice-Presidential Candidate 1</value>
<value>Vice-Presidential Candidate 2</value>
</display_list>
<store_list>
<value>1</value>
<value>2</value>
</store_list>
</question>
</question_list>
</subsection>
</subsection_list>
</master_survey>
</survey_input>
The subsection Xml Misc Demo Election Subsection has a Set_Question_Ctr, Randomized_Questions, and JumpTo_Survey question elements. Here is the Set_Question_Ctr question element.
<question input_type="Set_Question_Ctr">
<question_text>UpperLetter</question_text>
<line_breaks>0</line_breaks>
</question>
This particular Set_Question_Ctr instruction means all questions which follows this question and which prompt the user for a response will be label with a uppercase letter preface. Here is the Randomized_Questions question element.
<question input_type="Randomized_Questions">
<question_text>randomized next 4 questions</question_text>
<num_rows>4</num_rows>
<line_breaks>0</line_breaks>
</question>
This particular Randomized_Questions instruction means the order of the next 4 questions following this question and which prompt the user for a response will be randomizied. Here is the JumpTo_Survey question element.
<question input_type="JumpTo_Survey">
<question_text>No</question_text>
<num_rows>1</num_rows>
<line_breaks>0</line_breaks>
</question>
This particular JumpTo_Survey instruction means if the answer from the previous question matches the text No then jump to survey subsection number 1. Since this question is in the first subsection of the master survey, the result is jump to the end of the survey.
Here is the output from creating the xml survey which the xml input text.
| Survey URL | https://websurvey.princeton.edu/cgi-bin/xml_survey_misc_demo.pl |
| OptionalTitle | Xml Misc Survey Demonstration |
| Survey Done | NO |
| Netid Authenticate | YES |
| Allow Retakes | NO(With No Retake List) |
| Netid Filter | |
| Background Color | orange |
| Ip Filter | |
| Start Text | Please read the candidates positions by going here USG before voting.==Go Vote! |
| End Text | Thank you for voting. To view the elections results please go here USG |
| Authentication Text | This xml survey demonstation is available to valid Princeton netid and Email password. |
| Survey Done Text | |
| Survey Html Page | https://websurvey.princeton.edu/xml_survey_misc_demo.html |
| Survey Subsection List |
| Xml Misc Demo Election Subsection |
| Xml Misc Demo Polling Subsection |
To try out this demo xml survey ( in review mode ), go to Xml Misc Survey Demo
By specifying the cond_subsection_list element in a subsection element, the survey owner can create conditional surveys and refer to a conditional survey in a question element for conditional survey processing. Here is a sample xml text. The subsection names are bold and the conditional subsection names are bold and italicized. The question elements which specify conditional processing are bold.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE survey_input SYSTEM "http://websurvey.princeton.edu/Html_Files/WebSurvey.dtd">
<survey_input>
<master_survey>
<mastername>Xml Cond Survey Demo</mastername>
<scriptname>xml_cond_survey_demo</scriptname>
<optional_title><center><h4>Xml Conditional Survey Demonstration</h4></center></optional_title>
<want_authenticate>Y</want_authenticate>
<authentication_text><center><h4>This xml conditional survey demonstation is available to valid Princeton netid and Email password.</h4></center><a target="NEW" href="https://websurvey.princeton.edu">Survey Doc</a>==Go Authenticate!</authentication_text>
<start_text>Please read the candidates positions by going here <a target="NEW" href="https://www.princeton.edu/usg/">USG</a> before voting.==Go Vote!</start_text>
<end_text>Thank you for voting. To view the elections results please go here <a target="NEW" href="https://www.princeton.edu/usg/">USG</a></end_text>
<background_color>orange</background_color>
<subsection_list>
<subsection>
<subsectionname>Xml Cond Demo Election Subsection</subsectionname>
<cond_subsection_list>
<cond_subsection>
<subsectionname>Candidate 1 Election Cond Subsection</subsectionname>
<optional_title><center><h4>This is the presential election cond subsection</h4></center></optional_title>
<background_color>aqua</background_color>
<question_list>
<question input_type="CheckBox">
<question_text><b>Do You Agree Presidential Candidate 1 On the Following Issues</b></question_text>
<answer_required>N</answer_required>
<next_row>Y</next_row>
<display_list>
<value>Honor Code</value>
<value>Spending Priorities</value>
<value>Academic Priorities</value>
</display_list>
</question>
<question input_type="Text_Box">
<question_text><b>Enter your comments about Presidential Candidate 1</b></question_text>
<answer_required>N</answer_required>
<max_columns>40</max_columns>
<num_rows>4</num_rows>
<next_row>Y</next_row>
</question>
</question_list>
</cond_subsection>
<cond_subsection>
<subsectionname>Candidate 2 Election Cond Subsection</subsectionname>
<optional_title><center><h4>This is the presential election cond subsection</h4></center></optional_title>
<background_color>blue</background_color>
<question_list>
<question input_type="CheckBox">
<question_text><b>Do You Agree Presidential Candidate 2 On the Following Issues</b></question_text>
<answer_required>N</answer_required>
<next_row>Y</next_row>
<display_list>
<value>Honor Code</value>
<value>Spending Priorities</value>
<value>Academic Priorities</value>
</display_list>
</question>
<question input_type="Text_Box">
<question_text><b>Enter your comments about Presidential Candidate 2</b></question_text>
<answer_required>N</answer_required>
<max_columns>40</max_columns>
<num_rows>4</num_rows>
<next_row>Y</next_row>
</question>
</question_list>
</cond_subsection>
</cond_subsection_list>
<optional_title><center><h4>This is the election subsection</h4></center></optional_title>
<background_color>yellow</background_color>
<question_list>
<question input_type="Comments_Only">
<question_text>Note in the next question, if you select Candidate 1, you will be prompted with a question about Candidate 1.
If you select Candidate 2, you will be prompted with a question about Candidate 2.</question_text>
</question>
<question input_type="Radio_Buttons">
<question_text><b>Please select a Presidential Candidate</b></question_text>
<next_row>Y</next_row>
<display_list>
<value>Presidential Candidate 1</value>
<value>Presidential Candidate 2</value>
</display_list>
<store_list>
<value>1</value>
<value>2</value>
</store_list>
</question>
<question input_type="Conditional_Survey">
<question_text>1</question_text>
<line_breaks>0</line_breaks>
<submit_text>Candidate 1 Election Cond Subsection</submit_text>
</question>
<question input_type="Conditional_Survey">
<question_text>2</question_text>
<line_breaks>0</line_breaks>
<submit_text>Candidate 2 Election Cond Subsection</submit_text>
</question>
<question input_type="Radio_Buttons">
<question_text><i>Please select a Vice-Presidential Candidate</i></question_text>
<display_list>
<value>Vice-Presidential Candidate 1</value>
<value>Vice-Presidential Candidate 2</value>
</display_list>
<store_list>
<value>1</value>
<value>2</value>
</store_list>
</question>
<question input_type="PopUp">
<question_text><b><i>Please select number</i></b></question_text>
<display_submit>Y</display_submit>
<submit_text>Go Vote!</submit_text>
<next_row>Y</next_row>
<display_list>
<value>1</value>
<value>2</value>
</display_list>
<store_list>
<value>1</value>
<value>2</value>
</store_list>
</question>
</question_list>
</subsection>
<subsection>
<subsectionname>Xml Cond Demo Election Polling Subsection</subsectionname>
<cond_subsection_list>
<cond_subsection>
<subsectionname>Polling Location Cond Subsection</subsectionname>
<optional_title><center><h4>This is the election polling cond subsection A</h4></center></optional_title>
<background_color>cyan</background_color>
<question_list>
<question input_type="Text_Box">
<question_text><b>Please enter the locations which you have met the Presidential Candidates</b></question_text>
<answer_required>N</answer_required>
<max_columns>40</max_columns>
<num_rows>4</num_rows>
<next_row>Y</next_row>
</question>
</question_list>
</cond_subsection>
<cond_subsection>
<subsectionname>Polling 1 Cond Subsection</subsectionname>
<optional_title><center><h4>This is the election polling vice presidential 1 cond subsection</h4></center></optional_title>
<background_color>white</background_color>
<question_list>
<question input_type="Text_Box">
<question_text><b>Please indicate why you think Vice Presidential 1 will win</b></question_text>
<answer_required>N</answer_required>
<max_columns>40</max_columns>
<num_rows>4</num_rows>
<next_row>Y</next_row>
</question>
</question_list>
</cond_subsection>
<cond_subsection>
<subsectionname>Polling 2 Cond Subsection</subsectionname>
<optional_title><center><h4>This is the election polling vice presidential 2 cond subsection</h4></center></optional_title>
<background_color>white</background_color>
<question_list>
<question input_type="Text_Box">
<question_text><b>Please indicate why you think Vice Presidential 2 will win</b></question_text>
<answer_required>N</answer_required>
<max_columns>40</max_columns>
<num_rows>4</num_rows>
<next_row>Y</next_row>
</question>
</question_list>
</cond_subsection>
</cond_subsection_list>
<optional_title><center><h4>This is the election polling subsection</h4></center></optional_title>
<background_color>green</background_color>
<question_list>
<question input_type="Text_Box">
<question_text><b>Enter your comments about this election</b></question_text>
<answer_required>N</answer_required>
<max_columns>40</max_columns>
<num_rows>4</num_rows>
<next_row>Y</next_row>
</question>
<question input_type="Text_Line">
<question_text><i>Please enter your major</i></question_text>
<answer_required>N</answer_required>
<next_row>Y</next_row>
</question>
<question input_type="Comments_Only">
<question_text>Note in the next question, if you have indicate that you have met a Presidential candidate you will be prompt with a question about where.</question_text>
</question>
<question input_type="CheckBox">
<question_text><b><i>Please check off the Presidential Candidates you have actually meet in person</i></b></question_text>
<answer_required>N</answer_required>
<display_list>
<value>Presidential Candidate 1</value>
<value>Presidential Candidate 2</value>
</display_list>
</question>
<question input_type="Conditional_Survey">
<question_text>Not_Null</question_text>
<line_breaks>0</line_breaks>
<submit_text>Polling Location Cond Subsection</submit_text>
</question>
<question input_type="Comments_Only">
<question_text>Note in the next question, if you select Candidate 1, you will be prompted with a question about Candidate 1.
If you select Candidate 2, you will be prompted with a question about Candidate 2.</question_text>
</question>
<question input_type="Radio_Buttons">
<question_text><b>Please select the Vice Presidential Candidates most likely to win</b></question_text>
<answer_required>N</answer_required>
<line_breaks>0</line_breaks>
<display_list>
<value>Vice-Presidential Candidate 1</value>
<value>Vice-Presidential Candidate 2</value>
</display_list>
<store_list>
<value>1</value>
<value>2</value>
</store_list>
</question>
<question input_type="Conditional_Survey">
<question_text>1</question_text>
<line_breaks>0</line_breaks>
<submit_text>Polling 1 Cond Subsection</submit_text>
</question>
<question input_type="Conditional_Survey">
<question_text>2</question_text>
<line_breaks>0</line_breaks>
<submit_text>Polling 2 Cond Subsection</submit_text>
</question>
<question input_type="Comments_Only">
<question_text><!--Place Holder for submit button --></question_text>
<line_breaks>0</line_breaks>
<display_submit>Y</display_submit>
<submit_text>Go Vote!</submit_text>
</question>
</question_list>
</subsection>
</subsection_list>
</master_survey>
</survey_input>
The subsection Xml Cond Demo Election Subsection has two conditional subsections, Candidate 1 Election Cond Subsection and Candidate 2 Election Cond Subsection. This subsection specified conditional survey processing with the following question elements
<question input_type="Conditional_Survey">
<question_text>1</question_text>
<line_breaks>0</line_breaks>
<submit_text>Candidate 1 Election Cond Subsection</submit_text>
</question>
<question input_type="Conditional_Survey">
<question_text>2</question_text>
<line_breaks>0</line_breaks>
<submit_text>Candidate 2 Election Cond Subsection</submit_text>
</question>
In a conditional_survey question element, the matching string is specified by the value in question_text element and the conditional survey name is specified by the value of submit_text element. Therefor, The first question element translates to if the answer from the previous question matches the text 1 then invoke conditional survey Candidate 1 Election Cond Subsection. Similarly, the second question element translates to if the answer from the previous question matches the text 2 then invoke conditional survey Candidate 2 Election Cond Subsection.
The subsection Xml Cond Demo Election Polling Subsection has three conditional subsections, Polling Location Cond Subsection, Polling 1 Cond Subsection, and Polling 2 Cond Subsection. This subsection specified conditional survey processing with the two sets of question elements. The first set is
<question input_type="Conditional_Survey">
<question_text>Not_Null</question_text>
<line_breaks>0</line_breaks>
<submit_text>Polling Location Cond Subsection</submit_text>
</question>
<question input_type="Comments_Only">
This question element translates to if there is an response from the previous question ( indicate by the special tag Not_Null as the question_text elmement value ), then invoke the conditional survey Polling Location Cond Subsection.
The other set is
<question input_type="Conditional_Survey">
<question_text>1</question_text>
<line_breaks>0</line_breaks>
<submit_text>Polling 1 Cond Subsection</submit_text>
</question>
<question input_type="Conditional_Survey">
<question_text>2</question_text>
<line_breaks>0</line_breaks>
<submit_text>Polling 2 Cond Subsection</submit_text>
</question>
The first question element translates to if the answer from the previous question matches the text 1 then invoke the conditional survey Polling 1 Cond Subsection. The second question element translates to if the answer from the previous question matches the text 2 then invoke the conditional survey Polling 2 Cond Subsection. Here are the actual output from creating the xml survey with the sample xml conditional survey text
| Survey URL | https://websurvey.princeton.edu/cgi-bin/xml_cond_survey_demo.pl |
| OptionalTitle | Xml Conditional Survey Demonstration |
| Survey Done | NO |
| Netid Authenticate | YES |
| Allow Retakes | NO(With No Retake List) |
| Netid Filter | |
| Background Color | orange |
| Ip Filter | |
| Start Text | Please read the candidates positions by going here USG before voting.==Go Vote! |
| End Text | Thank you for voting. To view the elections results please go here USG |
| Authentication Text | This xml conditional survey demonstation is available to valid Princeton netid and Email password. |
| Survey Done Text | |
| Survey Html Page | https://websurvey.princeton.edu/xml_cond_survey_demo.html |
| Survey Subsection List |
| Xml Cond Demo Election Subsection |
| Xml Cond Demo Election Polling Subsection |
To try out this demo xml conditional survey ( in review mode ), go to
Master Survey Xml Conditional Survey Demo
The Master Survey Editor now provides an option to generate xml text for a master survey. This option will generate the xml text and validates that xml survey against the survey sytem dtd file. Here is the ooutput from operation on the master survey "Xml Survey Demo"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE survey_input SYSTEM "http://websurvey.princeton.edu/Html_Files/WebSurvey.dtd">
<survey_input>
<master_survey>
<mastername>Xml Survey Demo</mastername>
<scriptname>xml_survey_demo</scriptname>
<optional_title><center><h4>Xml Survey Demonstration</h4></center></optional_title>
<want_authenticate>Y</want_authenticate>
<authentication_text><center><h4>This xml survey demonstation is available to valid Princeton netid and Email password.</h4></center><a target="NEW" href="https://websurvey.princeton.edu">Survey Doc</a>==Go Authenticate!</authentication_text>
<start_text>Please read the candidates positions by going here <a target="NEW" href="https://www.princeton.edu/usg/">USG</a> before voting.==Go Vote!</start_text>
<end_text>Thank you for voting. To view the elections results please go here <a target="NEW" href="https://www.princeton.edu/usg/">USG</a></end_text>
<background_color>orange</background_color>
<subsection_list>
<subsection>
<subsectionname>Xml Demo Election Subsection</subsectionname>
<optional_title><center><h4>This is the election subsection</h4></center></optional_title>
<background_color>yellow</background_color>
<question_list>
<question input_type="CheckBox">
<question_text><b>Please select a Presidential Candidate</b></question_text>
<next_row>Y</next_row>
<display_list>
<value>Presidential Candidate 1</value>
<value>Presidential Candidate 2</value>
</display_list>
</question>
<question input_type="Radio_Buttons">
<question_text><i>Please select a Vice-Presidential Candidate</i></question_text>
<display_list>
<value>Vice-Presidential Candidate 1</value>
<value>Vice-Presidential Candidate 2</value>
</display_list>
<store_list>
<value>1</value>
<value>2</value>
</store_list>
</question>
<question input_type="PopUp">
<question_text><b><i>Please select number</i></b></question_text>
<display_submit>Y</display_submit>
<submit_text>Go Vote!</submit_text>
<next_row>Y</next_row>
<display_list>
<value>1</value>
<value>2</value>
</display_list>
</question>
</question_list>
</subsection>
<subsection>
<subsectionname>Xml Demo Election Polling Subsection</subsectionname>
<optional_title><center><h4>This is the election polling subsection</h4></center></optional_title>
<background_color>green</background_color>
<question_list>
<question input_type="Text_Box">
<question_text><b>Enter your comments about this election</b></question_text>
<max_columns>40</max_columns>
<num_rows>4</num_rows>
<next_row>Y</next_row>
</question>
<question input_type="Text_Line">
<question_text><i>Please enter your major</i></question_text>
<next_row>Y</next_row>
</question>
<question input_type="CheckBox">
<question_text><b><i>Please check off the Presidential Candidates you have actually meet in person</i></b></question_text>
<display_list>
<value>Presidential Candidate 1</value>
<value>Presidential Candidate 2</value>
</display_list>
</question>
<question input_type="Radio_Buttons">
<question_text><b>Please select the Vice Presidential Candidates most likely to win</b></question_text>
<display_submit>Y</display_submit>
<submit_text>Go Vote!</submit_text>
<display_list>
<value>Vice-Presidential Candidate 1</value>
<value>Vice-Presidential Candidate 2</value>
</display_list>
<store_list>
<value>1</value>
<value>2</value>
</store_list>
</question>
</question_list>
</subsection>
</subsection_list>
</master_survey>
</survey_input>
Procedure For Customized Authentication Form
Procedure For Customized Start Page Form
To see a demonstration, please take the Customize Demo. This master survey has been configured with
For authenticated master survey, the survey owner can now customized the error messages for the following situations:
In all situations, you can use SURVEY_LOGIN tag as place holder for the netid or loginname entered by the respondent, i.e.,
SURVEY_LOGIN has already taken this survey!
In the master survey editor, the survey owner can now schedule when a master survey is done. The owner specifies the date and time using the format MM/DD/YYYY HH24:MI, i.e. 03/13/2002 19:30. The survey owner will get an email when that survey has been marked done. Note that the owner can also remove the schedule mark done job after scheduling the mark done job.
Prior to July 24, 2002, survey users create survey lists and choices without any ownership assigned to those created survey objects. The rationale behind having no owernership for lists and choices was to allow survey owners to jointly shared these objects. Both the list editor and choice editor permit a survey owner to have complete access to any list or choice. However, the more typical scenario is the survey owner only wants to use lists and choices that they created, i.e. those lists and choices that they owned. Also, the survey system will be secure if only the owner can modify the lists and objects which belong to the owner.
To address these issues, the survey system has been modified to support list and choice ownership. Now both the list editor and the choice editor have the following functionalities
To accommodate situations when multiple netids are working on the same master survey and therefore require netids to have edit privileges to lists and choices, the primary netid can grant edit list and edit privilege to other netids. The primary netid is the owner of the master survey. The primary netid is the original owner of the lists and cchoices of the master survey. To allow other netids to have edit access to those lists and choices, the primary netid can use the "Grant User Privs" feature in the master survey editor. There are now two new user privileges, Edit List and Edit Choice. The Edit List privilege allows the netid to edit lists in the master survey. The Edit Choice privilege allows the netid to edit choices in the master survey.
The survey system provides a mechanism which enables survey users to randomly assigned respondents to different "surveys". This mechanism ultilizes a new input type, Random Selection, and the JumpTo_Survey processing. The Random Selection input type randomly selects a value from a list of values and that value is then stored as a survey response. Then the survey owner constructs the JumpTo_Survey processing to jump to the appropriate survey subsections. Consequently, each respondent will be randomly assigned to a different survey.
To see how this works, go take the Randomized Survey Demo. The master survey for this demo consists of five subsections
In the Starting Subsection, the setup for the randomized subsection process consists of four survey questions. The first survey question has text A,B,C,D and is connected to the reserved choice whose input type is Random Selection. The next three survey questions are connected to the reserved choice with the input type JumpTo_Survey and have different question texts ( B, C, and D ) and different Num_Rows value (3, 4, and 5).
The first question directs the survey system to randomly select a value from the list A,B,C,D and stores that value as a response. The first Jumpto_Survey question directs the survey system to jump to subsection 3 if the previous response is B. The second Jumpto_Survey question directs the survey system to jump to subsection 4 if the previous response is C. The third Jumpto_Survey question directs the survey system to jump to subsection 5 if the previous response is D. Note that if the response is A then none of the JumpTo_Survey conditions are meet and the survey system goes to the next subsection 2.
In each of the four subsections, Subsection A, Subsection B, Subsection C, and Subsection D there is JumpTo_Survey processing which unconditionally take the respondent to the end of the survey. In an actual survey, the owner may construct his own logic to go to different subsections.
There are two steps require to use a picture as a submit button.
1)Set Display Submit Buttonfor a question to Y.
2)set the Submit Button Textfor the same question, to IMAGE_SUBMIT:picture_url
where picture_url is a fully qualified url, for example,
IMAGE_SUBMIT:https://www.princeton.edu/~faccomp/store/bin/login_submit.gif
To see an subsection with this feature go toSubmit Gif Example
By default, the Answer Type for all questions is Text. However when a Text Line input type question has Answer Type set as Numeric, the check numeric processing is enabled for that question. When the respondent enters a non-numeric answer for that question, a Javascript window pops up to inform the respondent that the answer is not a number. If the respondent clicks on a Submit button after entering a non-numeric answer, then the same Javascript window with the same error message will appear and the Submit action will not occur.
An answer is a valid number if the answer obeys all of the following rules
1)consists of only digits 0 thru 9 and at most one decimal sign .
2)one plus sign + is allowed only if it the first character
3)one minus sign - is allowed only if it is the first character
To see the feature in action, go to Check Numeric Demo.
This feature is also available if you choose use create the survey using the xml format. Just add the element
<answer_type>Numeric</answer_type>
at the appropriate location for those questions with Text_Line input type. Here is the xml output that corresponds to the Check Numeric Demo
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE survey_input SYSTEM "http://websurvey.princeton.edu/Html_Files/WebSurvey.dtd">
<survey_input>
<master_survey>
<mastername>Check Numeric Demo</mastername>
<scriptname>check_numeric</scriptname>
<optional_title><center><h4>Check Numeric Demo</h4></center></optional_title>
<background_color>white</background_color>
<subsection_list>
<subsection>
<subsectionname>Check Numeric Demo</subsectionname>
<optional_title><center><h4>Check Numeric Demo</h4></center></optional_title>
<background_color>white</background_color>
<left_margin>5</left_margin>
<right_margin>5</right_margin>
<question_list>
<question input_type="Comments_Only">
<question_text>
This survey demonstrates the check numeric processsing that is available in the web survey facility.
By default, the <b>Answer Type</b> for all questions is <b>Text</b>.
However when a <b>Text Line</b> input type question has <b>Answer Type</b> set as <b>Numeric</b>,
the check numeric processing is enabled for that question.
When the respondent enters a non-numeric answer for that question, a Javascript window pops up to inform
the respondent that the answer is not a number.
If the respondent clicks on a Submit button after entering a non-numeric answer, then the same
Javascript window with the same error message will appear and the <b>Submit action will not occur</b>.
An answer is a valid number if the answer obeys all of the following rules
1)consists of only <b>digits 0 thru 9</b> and at most one decimal sign <b>.</b>
2)one plus sign <b>+</b> is allowed only if it the <b>first character</b>
3)one minus sign <b>-</b> is allowed only if it is <b>the first character</b></question_text>
</question>
<question input_type="Text_Line">
<question_text>Please enter a number</question_text>
<answer_required>N</answer_required>
<max_columns>12</max_columns>
<answer_type>Numeric</answer_type>
</question>
</question_list>
</subsection>
</subsection_list>
</master_survey>
</survey_input>
This check numeric processing now supports optional minimum and maximum validation. To enable the optional minimum validation, set the "Minimum Value" property to the desired value for that question. To enable the optional maximum validation, set the "Maximum Value" property to the desired value for that question. To see the feature in action, go to Check Numeric Min Max Demo. This enchanced check numeric processing is also available in the xml support. Here is the Xml text for the Check Numeric Min Max Demo.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE survey_input SYSTEM "http://websurvey.princeton.edu/Html_Files/WebSurvey.dtd">
<survey_input>
<master_survey>
<mastername>Check Numeric Min Max Demo</mastername>
<scriptname>check_numeric_minmax</scriptname>
<optional_title><center><h3>Check Numeric Min Max Demo</h3></center></optional_title>
<end_text><center><h4>Thank you for your participation!</h4</center></end_text>
<background_color>white</background_color>
<subsection_list>
<subsection>
<subsectionname>Check Numeric Min Max Demo</subsectionname>
<optional_title><center><h4>Check Numeric Min Max Demo</h4></center></optional_title>
<background_color>white</background_color>
<left_margin>5</left_margin>
<right_margin>5</right_margin>
<question_list>
<question input_type="Comments_Only">
<question_text>This survey demonstrates the check numeric processing that is available
in the web survey facility. By default, the <b>Answer Type</b> for all questions
is <b>Text</b>. However when a <b>Text Line</b> input type question has
<b>Answer Type</b> set as <b>Numeric</b>, the check numeric processing is
enabled for that question. When the respondent enters a non-numeric answer for that question, a
Javascript window pops up to inform the respondent that the answer is not a number. If the respondent
clicks on a Submit button after entering a non-numeric answer, then the same Javascript window with
the same error message will appear and the <b>Submit action will not occur</b>.
An answer is a valid number if the answer obeys all of the following rules
1)consists of only <b>digits 0 thru 9</b> and at most one decimal sign <b>.</b>
2)one plus sign <b>+</b> is allowed only if it the <b>first character</b>
3)one minus sign <b>-</b> is allowed only if it is <b>the first character</b>
4)does <b>not have any commas</b>
Note if either the <b>Minimum Value</b> or the <b>Maximum Value</b> for a
question has been set, then a Javascript window pops up to inform the respondent the appropriate
error condition has occurred.</question_text>
</question>
<question input_type="Text_Line">
<question_text>Please enter a number</question_text>
<answer_required>N</answer_required>
<max_columns>12</max_columns>
<answer_type>Numeric</answer_type>
</question>
<question input_type="Text_Line">
<question_text>Please enter a number between 0 and 10. Note that for this quetion, the
<b>Minimum Value</b> is set to 0 and the <b>Maximum Value</b> is set to 10.</question_text>
<answer_required>N</answer_required>
<max_columns>12</max_columns>
<next_row>Y</next_row>
<answer_type>Numeric</answer_type>
<min_value>0</min_value>
<max_value>10</max_value>
</question>
</question_list>
</subsection>
</subsection_list>
</master_survey>
</survey_input>
All survey questions have a Randomize Answers flag which determines if the dislayed list of values should be randomized ( note this only applies if the choice input type is a Radio Button, Checkbox, or Scrollable List). The survey system uses a value called a random seed to randomized a list. By default, each randomization process ultilizes a different random seed to insure two consecutive questions do not generate the same ordered list. However, there are situations when survey users want the same randomized order list for n consecutive questions. For example, there are five candidates in an election and there are five questions to prompt the user for their first, second,third, fourth, and fifth selections. For all five questions, the survey owner wants the same randomized order list. To handle this situation, the survey owner can used the reserved choice with the Same_Seed input type. The survey owner inserts a question attached to the reserved choice with the Same_Seed input type and specified that question's Num_Rows value equal to the number of questions the Same_Seed processing should cover. Note the Seed_Seed question must be inserted immediately before the set of questions which requires this processing. The actual type Same_Seed processing is determined by the value specified in the question text. The following details the valid values and the type of Same_Seed processing.
| Valid Same_Seed Values | Same_Seed Processing |
| Yes | Use the same seed for the next set of Num Rows questions |
| Reset | Generate a different seed and use that new seed for the next set of Num Rows questions |
| No | Revert back to default processing where a different random seed is used for each question. Note that for this situation only, the Num Rows value is not relevant. |
To see the various Same_Seed processing, go view the Same Seed Demo Survey.
To enable rank_items processing first create a choice with the Rank_Items input type and set both the display list and the value list to the same survey list.
Then create a survey question attached to that new choice. The question text is used to defined the various components of the rank_item processing.
The following table details the fields, their meanings, their default values, and their required statuses.
| Field | Meaning | Required Field? | Default Value | Relevant Comments |
| RK_TEXT | Display text | YES | NONE | |
| RK_SELECT | Title of selection list | YES | NONE | |
| RK_CHOSEN | Title of chosen list | YES | NONE | |
| RK_ENABLE_NULL | Flag to enable NULL processing | NO | NO | If value is set to YES, then respondent is allowed to enter a null value as a selection by clicking on the NULL selection button |
| RK_NULL | text used as the NULL value | NO | NULL | Note that this field is applicable only if NULL processing is enabled, i.e. RK_ENABLE_NULL is set to YES |
| RK_BTN_NULL | text used in the NULL Selection Button | NO | Enter NULL as selection | Note that this field is applicable only if NULL processing is enabled, i.e. RK_ENABLE_NULL is set to YES |
| RK_BTN_CLR | text used in the Clear Selection Button | NO | Clear Current Selection | |
| RK_MAX | maximum number of allowed selection | NO | 0 | Note if RK_MAX=0, then the actual maximum number of allowed selection is the number of items in the display list associated with the choice. This number also determines the number of rows of the input field associated with the chosen selection. |
| RK_ERR_ENTER | Error message when respondent attempts to type a character in the input field associated with the chosen selection | NO | You are not allowed to enter text here! | |
| RK_ERR_MAX | Error message when respondent attempts to select more than the maximum number | NO | Maximum selection reached! | |
| RK_ALIGN_SELECT | specifies the alignment of the selection title and list to the table cell | NO | C | If values is "C", then the alignment is centered. If values is "R", then the alignment is to the right If values is "L", then the alignment is to the left. |
| RK_ALIGN_CHOSEN | specifies the alignment of the chosen title and list to the table cell | NO | C | If values is "C", then the alignment is centered. If values is "R", then the alignment is to the right If values is "L", then the alignment is to the left. |
The rank_item layout consists of a table with three rows. The first row contains RK_TEXT and spans two columns. The next row has two columns of equal width. The first column of that row contains RK_SELECT and the selection list. The value of RK_ALIGN_SELECT determines the alignments of those two fields in that column. The second column of that row contains RK_CHOSEN and the chosen input field. The value of RK_ALIGN_CHOSEN determines the alignments of those two fields in that column. The third and final row contains the NULL selection button and the clear selection button (note if NULL processing is not enabled, then there the NULL selection button is not displayed.
From the respondent's perspective, here is how the rank_items processing works. The respondent clicks on an item from the scrollable list and that item will appear on the selected textbox. The next selected item will then appear below the previously selected item in the textbox. If NULL processing is enabled and the user clicks on the RK_BTN_NULL button, the NULL value will appear as the next selected value. When the maximum number is reached, the next selection ( either from the scrollable list or the RK_BTN_NULL button ) will cause a Javascript window to appear and display the appropriate maximum selection error message. To clear all the selections and start over again, the user can click on the RK_BTN_CLR button. The textbox will be set to all blanks. Note that the user is not allowed to type in the textbox. If the users attempts to do that, a Javascript window will appear and display the appropriate error message.
To see how the Rank_Items processing works, go try the Rank_Items Demo Survey.
As previous stated, the rank order of the selected items is preserved. To demonstrate this feature, we will look at the current responses to the Rank_Items Demo survey. That survey has two rank_items questions. The first question prompts the user to rank the following list ( with NONE as the NULL value)
| Presidential Candidate #1 |
| Presidential Candidate #2 |
| Presidential Candidate #3 |
| Presidential Candidate #4 |
| Presidential Candidate #5 |
The second question prompts the user to rank ( at most two items ) from the following list ( with NULL as the NULL value)
| Senate Candidate #1 |
| Senate Candidate #2 |
| Senate Candidate #3 |
| Senate Candidate #4 |
| Senate Candidate #5 |
There are currently two responses. The first response has the following answers
The second response has the following answers
When you use the Dump tool to download the responses using html format, you will get the following
| Ip Addr | Response Id | Date | Please rank the Presidential Candid... | Please rank the Presidential Candid... | Please rank the Presidential Candid... | Please rank the Presidential Candid... | Please rank the Presidential Candid... | Please select at most two senate ca... | Please select at most two senate ca... |
| * | 133025 | 10/23/2002 10:20 | Presidential Candidate #5 | NONE | NONE | Presidential Candidate #3 | Senate Candidate #4 | NULL | |
| * | 133026 | 10/23/2002 10:20 | NONE | NONE | Presidential Candidate #5 | Presidential Candidate #3 | Presidential Candidate #1 | Senate Candidate #4 | Senate Candidate #2 |
You can also use the tabulation tool on rank_items questions. The tabulation tool will shown the RK_TEXT text, the RK_MAX value, and for each ranking the non-zero totals. Note that this tool does not generate any graphs for rank_items questions. Here is the result for the first rank_item question
| Please rank the Presidential Candidates from highest to lowest by clicking on the candidates' name from the selection list. The selected names will appear in the Choosen Presidential Candidates input field. If you do not want to rank a candidate in the current order, click on Select NONE for Presidential Candidate button. The text NONE will appear in the Choosen Presidential Candidates input field. | |
| Maximum Rank Selection Count is 5 | |
| Selection List Presidential Candidate #1 Presidential Candidate #2 Presidential Candidate #3 Presidential Candidate #4 Presidential Candidate #5 | |
| Choice 1 Results | For NONE:Total is 1 For Presidential Candidate #5:Total is 1 |
| Choice 2 Results | For NONE:Total is 2 |
| Choice 3 Results | For NONE:Total is 1 For Presidential Candidate #5:Total is 1 |
| Choice 4 Results | For Presidential Candidate #3:Total is 2 |
| Choice 5 Results | For Presidential Candidate #1:Total is 1 |
Here is the result for the second rank_item question
| Please select at most two senate candidates by clicking on the candidates' names in the Select Senate Candidate List. The selected names will apppear in the Choosen Senate Candidates List input field. If you do not want to select a candidate in the current order, click on Enter NULL as selection button. The text NULL will appear in the Choosen Senate Candidates List input field. | |
| Maximum Rank Selection Count is 2 | |
| Selection List Senate Candidate #1 Senate Candidate #2 Senate Candidate #3 Senate Candidate #4 Senate Candidate #5 | |
| Choice 1 Results | For Senate Candidate #4:Total is 2 |
| Choice 2 Results | For Senate Candidate #2:Total is 1 For NULL:Total is 1 |
There are situations when a respondent is required to rank items and to specify a response for for the the rank items, i.e. when one of the items is "Other (Please Specify)". To support this feature, the survey system uses the same Other tag , ==, that is used for specifying additional inputs for radio buttons and checkboxes. For example, consider the following list
1
2
3
4
Other(Please specify)==32
Note you can use specify at most one Other tag in a list that is used in a Rank_Items choice.
The text which will appear next to the additional input field is determined by the RK_OTHER field.
The following table summarizes the properties assosciated with the RK_OTHER field.
| Field | Meaning | Required Field? | Default Value | Relevant Comments |
| RK_OTHER | Text for the "Other" text input field | NO | Input for other_value_text | used only if value list has a value with the "Other" tag == |
To see how the Rank_Items with Other support processing works, go try the Rank_Items With Other Support Demo Survey. That demo has two rank_item questions which ask the respondent to rank services. The two rank_item questions are exactly the same except for the fact the second question actually specifies a value for the RK_OTHER field.
Just like the Other support for radio buttons and checkboxes, the response to the additional input field is combined with the Other value text.
For example there is currently one responses to the rank_item with other support. That response has the following answers
When the data is downloaded (in html format), you will get the following output
| Ip Addr | Response Id | Date | Please rank the services from highe... | Please rank the services from highe... | Please rank the services from highe... | Please rank the services from highe... | Please rank the services from highe... | Please rank the services from highe... | Please rank the services from highe... | Please rank the services from highe... | Please rank the services from highe... | Please rank the services from highe... |
| * | 133231 | 10/28/2002 10:26 | Other(Please specify)[Help Desk] | Computer Backups | Computer Backups | Web Support | Searches | Other(Please specify)[Printing] |
When the the first question is is tabulated, you will get the following output
| Please rank the services from highest to lowest by clicking on the services' name from the selection list. The selected names will appear in the Choosen Services input field. If you do not want to rank a service in the current order, click on Select NONE for Service button. The text NONE will appear in the Choosen Services input field. | |
| Maximum Rank Selection Count is 5 | |
| Selection List Searches Web Support Computer Backups Other(Please specify) | |
| Choice 1 Results | For Other(Please specify):Total is 1 |
| Choice 2 Results | For Computer Backups:Total is 1 |
| Choice 3 Results | No responses |
| Choice 4 Results | No responses |
| Choice 5 Results | No responses |
When the the second question is is tabulated, you will get the following output
| Please rank the services from highest to lowest by clicking on the services' name from the selection list. The selected names will appear in the Choosen Services input field. If you do not want to rank a service in the current order, click on Select NONE for Service button. The text NONE will appear in the Choosen Services input field. | |
| Maximum Rank Selection Count is 5 | |
| Selection List Searches Web Support Computer Backups Other(Please specify) | |
| Choice 1 Results | For Email:Total is 1 |
| Choice 2 Results | For Computer Backups:Total is 1 |
| Choice 3 Results | For Web Support:Total is 1 |
| Choice 4 Results | For Searches:Total is 1 |
| Choice 5 Results | For Other(Please specify):Total is 1 |
There are situations where there are survey subsections that have one comment label followed by a long list of randomized questions. If the survey respondent's web browser have a small screen, then the respondent must use the scroll bar to see the comment label. The survey owner can not manually insert the comment label questions into list of randomized subsections because those comment questions will themselves be randomized. The solution is to use the Comment Repeat functionality that is available with the randomized question. In addition to randomizing a set of questions, you can specify a comment label question to be displayed after every nth randomized question.
Here is an example of a survey with twelve randomized questions and the labels displayed after every fifth randomized questions