Text Questions
Wednesday, February 4th, 2009 | Interviewing, Scripting
A while back we noticed that someone searched the website for information about mrInterview questions types, so we have decided that we will add some articles about all the question types you can have in mrInterview. This article is about “Text” question types.
Text Questions : You use the text question type when you want to allow your respondents to enter some free text, this might be in the form of a comment or perhaps their name. When creating text questions we need to follow the following structure in out metadata section
[QuestionName] [QuestionText] text [Range] ;
Example :
Name "Q1. Please enter your name :" text [1..30];
Where :
QuestionName is the name of the question. There are a few things we should consider when creating our question names and your company may already have some rules that you need to follow, if you don’t have any rules to follow you should think about a few things. In our example we have decided that the question will be called Name, the reason we have chosen this name is because it describes the question that we are collecting information into and makes it easier for people to understand when it comes to using this data for tabulating or data management. We could have called our question “Q1″ as it is our first question, and for some people this works, but just think about what happens when you have to add a question in before Q1 ? Thinking a little about this before you start will save you time in the long run.
QuestionText is the text that is displayed to the respondent. You can put whatever text you like in here and if you really need to, you can but html code in this also. For example if you wanted to make the word “name” stand out we could make it bold. To do this we would type “Q1. Please enter your <b>name</b> :”
Next we have our “Question Type”, in this example we want to have a “Text” type question for more information on question types please click here.
Ranges are the allowable numbers of characters that you can enter in the text box.that the respondent can enter. In our example we have “[1..30]” this means the respondent is allowed to enter between one and thirty characters. The maximum number any text box can hold is 4000 To see the different types of ranges that you can have click here.
Now that we have our metadata we need to know how to ask the question. To do this we need to put the following code in the routing section of our MDD file.
Name.Ask()
This when the survey is run will display the following,

Name as ask
Now that we asked the question we may want to do other things to it, they could be ,
Q: How do I show my question so that it is read only?
Name.show()

Read only name
Q: How do I change the size of the text box?
Name.Style.Height = "80" Name.Style.Width = "500" Name.Show()

Text box with size changed
No comments yet.
Leave a comment
Categories
Blog Counts
News
Past Posts
- Learn HTML : Preformatted Text
- Report at end
- Learn Flash Lesson 3 : Categorical Question
- How to use DMQuery
- Learn HTML : Getting started Part 1
- Quick Post : Building nested tables without using nests
- Learn HTML : Comments , Spaces and New Lines
- Question Responses
- JavaScript Lesson 1 : Getting Started
- Killing two birds with one stone : Interim Results



