Adding banners to questions and pages
To add a banner to a question
Type the following statement in the routing section of the interview script.
<question_name>.Banners.Add("<banner_name>", <item_name>.Label)
To add a banner to a page
Type the following statement in the routing section of the interview script.
IOM.Banners.Add("<banner_name>", <item_name>.Label)
Parameters
<question_name>
The name of the question to which the banner should be added.
<banner_name>
The banner’s name.
<item_name>
The name of the information item containing the banner text.
Notes
These statements do not display the banner text. This happens when you display the question or page. Here is an example interview page with two page banners shown in red. (This is simply to highlight the banners in the illustration. The page was generated using the default template which displays the text in a different font face and size but not in a different color.
The metadata section for this page is as follows:
Disclosure "We do not disclose your personal details to anyone
outside our company." info;
HowUseAnswers "The answers you give to the following questions
will be used for analysis purposes only." info;
FirstName "What is your first name?" text [1..20];
Job "What is your position in your company?" categorical [1..1]
{
IntScriptwriter" Interview scriptwriter",
SMScriptwriter "Sample management scriptwriter",
SysAdmin "System administrator",
PhoneSupervisor "Phone room supervisor",
ProjMan "Project manager",
Interviewer, Coder
};
Demographics page(FirstName, Job);
The routing statements that add the banner text to the demographics page and then display the page are:
IOM.Banners.Add("DisclosureBanner",Disclosure.Label)
IOM.Banners.Add("HowUseAnswersBanner",HowUseAnswers.Label)
Demographics.Ask()
Because they have been added as page banners,
DisclosureBanner and
HowUseAnswersBanner will be displayed at the top of every page until the end of the interview or until they are manually removed (see
Removing banners from questions and pages for details).
Here is another example that shows a question banner, again highlighted in red. The first banner is the page banner retained from the previous example.
The metadata for this question and banner are:
EmailInfo "If you have more than one email address, please enter
the one that you want us to use when contacting you." info;
Email "And what is your email address?" text [5..99];
and the routing statements are:
Email.Banners.Add("EmailBanner",EmailInfo.Label)
Email.Ask()
If the metadata section uses a page statement to group several questions on the same page, and you want to add a banner to just one of the questions on the page, the Add statement must name the page and the question. For example, if the metadata section defines the following questions:
Name "What is your full name?" text [5..50];
EmailInfo "If you have more than one email address, please enter
the one that you want us to use when contacting you." info;
Email "And what is your email address?" text [5..99];
UserDetails "" page (Name, Email);
and the routing section contains the following statements:
UserDetails.Email.Banners.AddNew("EmailBanner",EmailInfo.Label)
UserDetails.Ask()
the respondent sees the following page:
See also