Create answer types |

|
FeedbackServer provides us a way to create our own answer types without any programming knowledge. Using the type creator we can create four types of answer types that we can then re-use inside our questions :
- Selection Types
- Field Types
- Xml Bound Types
- Sql Bound Types
- List Item Collection Types
Following properties can be set to customize each of our new or existing answer type.
Selection Types
- Field Name is the name of the type that will be shown in the type selection inside the answer editor.
- Allow Selection if we are creating a selection type we need to check this option.
- Field Entry is our selection type offering an alternate entry like the Selection - Other type.
Field Types
- Field Name is the name of the type that will be shown in the type selection inside the answer editor.
- Allow Selection if we are creating a field type we don't need to check this option.
- Field Entry we need to check this option to display the extra settings related to field types.
- Field Width of our field.
- Field Height of our field. If the height is more than one our field will be automatically rendered as a multi-line text box.
- Javascript Function Name is the name of the javascript function that will be called to validate the field content. The javascript function should be defined inside the javascript code option.
- Error Message is the error message that will show up if the javascript function return false.
- Javascript Code is the javascript code that will validate the field content. The function must return true if the condition is matched or false if the method could not validate the content of the field.
Code Example to validate a mandatory field :
function isFilled(sender)
{
if (sender.value.length == 0)
{
sender.focus();
return false;
}
else
{
return true;
}
}
Xml Bound Types
- Field Name is the name of the type that will be shown in the type selection inside the answer editor.
- Collection Layout Rendering is the user interface mode in which the data items will be displayed to the user inside the survey.
- Xml File Name is the file name of the Xml file that the type will be bound to.
Note that the Xml file has to be in the directory specified by FeedbackServerXmlDataPath ellement of the web.config. At this time it is not possible to edit or create Xml files through the administration interface.
The format of the Xml file must be as following :
<?xml version="1.0" standalone="yes"?>
<FSDataSource xmlns= "http://www.feedbackserver.com/FSDataSource.xsd">
<XmlDataSource>
<RunTimeAnswerLabel>Label To Show : </RunTimeAnswerLabel>
<XmlAnswers>
<XmlAnswer>
<AnswerValue></AnswerValue><AnswerDescription>[Select an answer]</AnswerDescription>
</XmlAnswer>
<XmlAnswer>
<AnswerValue>yourvalue1</AnswerValue><AnswerDescription>your answer</AnswerDescription></XmlAnswer>
</XmlAnswers>
<XmlAnswer>
<AnswerValue>yourvalue2</AnswerValue><AnswerDescription>your second answer</AnswerDescription></XmlAnswer>
</XmlAnswers>
</XmlDataSource>
</FSDataSource>
Sql Bound Types
- Field Name is the name of the type that will be shown in the type selection inside the answer editor.
- Collection Layout Rendering is the user interface mode in which the data items will be displayed to the respondent.
- Sql Query is the Sql query that will populate the drop down list.
List Items Types
Field Name is the name of the type that will be shown in the type selection inside the Answer Editor.
Collection Layout Renderingis the user interface mode in which the data items will be displayed to the user inside the survey.