List of dsc parameters
This page lists the parameters which can be uses in a DSC script.
When appropriate these parameters can be used with the following instructions in the ROUTE section:
ASK()
NEWPAGE()
MESSAGE()
WARNING()
Examples:
ASK(Month,'dropdown=yes')
NEWPAGE('javascript=module_note.js,jscript=note()')
MESSAGE("TEST VERSION ONLY",'class=test')
WARNING("Please check",'class=warning')
Parameters can also be specified as part of the QUESTION definition
Example:
Month "Which month:" : {Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec} : 'dropdown=yes'
anchor: fix an item position
anchor='yes'
This prevents the item from being reordered during shuffling.
Example:
C4 "Which of the following financial apps do you use?" : {
1 "Banking app",
2 "Insurance app",
3 "Payment company",
4 "Financial services application",
98 "Other, precise:@NS$" @[anchor='yes'] + OTH : TEXT[128] REQUIRED : 'size=20',
99 "None" @[xchoice='yes',anchor='yes']
}{*} REQUIRED
@[qnotes="Several answers possible"]
Note: You don’t need “anchor” with an extended list - that’s excluded from the shuffle and always placed at the end.
audio: insert an audio file
MESSAGE ('@AUDIO:myclip:controls=1:autoplay=yes:download=no$')
click here for notes on adding audio files.
checkbox: use a checkbox (QUESTION parameter)
checkbox=yes
Selection to be made by clicking a check box instead of a radio button.
cnotes: also display the cnotes choice attribute text when asking a question
cnotes=yes
If not set then only main labels of the choices are displayed.
Go to Full example program
css: identify the css file for the page
NEWPAGE('css=calendar')
Uses the file calendar.css for the page.
disabled: prevent selection or modification
ASK(q1,'disabled=yes')
Shades over a response and prevents the answer from being modified.
dropdown: dropdown list (QUESTION parameter)
ASK(q1,'dropdown=yes')
Display response choices as a dropdown list.
dropdownmsg: dropdown list message (QUESTION parameter)
dropdownmsg="Select a city"
Until an answer is selected, the drop-down list displays "Select a city".
highlight:
ASK(q30,'highlight=no')
Suppress cell highlighting in the error message.
javascript: call a javascript file
NEWPAGE('javascript=calendar')
Where calendar.js is the name of the script for the page.
jquery: call a jquery script
NEWPAGE('jquery=ui')
to call the file ui.js on the page
jscript: call a javascript function
NEWPAGE('jscript=fctq40()')
call the script of the function fctq40() on the page
maxlength: maximum number of characters (QUESTION parameter)
maxlength=2
Set the maximum number of characters to 2.
nav: navigation section
NEWPAGE('nav=nav_spe')
Use the file nav_spe.blk and not the default of nav.blk.
rank: record the order in which response categories selected (QUESTION parameter)
rank=yes
If used in dimensioned questions, disallows the same answer on different items
readonly: display contents of a question
ASK(SHOW_TEXT, 'readonly=yes')
INTEGER/OPEN/TEXT type questions only.
The label and content of the variable will be displayed.
Unlike 'disabled=yes' (see above), this makes it possible to display the variable without having an error message if the content is too long.
Does not work on 'lists of choices' questions which are displayed normally.
size: size of the field on the screen (QUESTION parameter)
size=150
Size of the text field will be 150 but it will be possible to enter more text.
splitlabels: separate the label text from the radio button or checkbox
ASK(q1,'splitlabels=left')
ASK(q2,'splitlabels=right')
template: call a blk file
NEWPAGE('template=calendar')
to use the file calendar.blk for the page.
top: header
NEWPAGE('top=top2')
the header will be taken from top2.blk rather than the default top.blk
transpose: transpose a question
ASK(q1,'transpose=yes')
video: play a video file
MESSAGE ('@VIDEO:myvideo:width=100%:controls=1:autoplay=no:download=no:muted=true:fullscreen=0:poster=gide.png$')
click here for notes on adding video files.
xchoice: make a choice exclusive
This ensures that the respondent can choose only this answer, even in a question with multiple answer choices.
99 "None of these products" @[xchoice='yes']
Go to example