BPC SurveyManager - Questions and Input Controls

From RiskWiki

Jump to: navigation, search
Input ControlDesciptionExample

Contents

This page provides examples of various types of input controls.


The best way to view these input devices is using BPC SurveyManager itself.

Click on this link to launch the BPC SurveyManager help:View Using BPC SurveyManager


This section provides examples of INFOOP controls

Infoop controls are controls that do not receive an input.


dlabel This control, is an example of a double column infoop (one that displays a text block over two columns, but does not require an input). These are good for headings and sub headings or embedding explanitory blocks in the text. The control also demonstrates how to get mulitple lines to appear in the question column.
The BPCSurveyManager Engine will automatically interpret a line break in a question field as a line break in a browser.

An infoop is literally an "information operation". To use this set:
Input=infoop
DisplayType=dlabel

dlabel
You can override the default 'centring' behaviour in mutliple ways. One is just to do it at the individual question level.
You can also override the font style (in this case to get bold (b) and italics (i) ) by inserting:
"<div align=left ><i ><b ><#question > </b ></i ></div >"
in the LayoutHTML field.

label This is an example of a single column infoop. (A text/HTML block that runs for a single column)

To use this set:
Input=infoop
DisplayType=label

You can also embed ordinary HTML in a question field. For example the following will insert a dot point list:

  • This is the first dot point.
  • This is the second dot point
  • This is the third dot point.

Of course this means that you can not just put a < or a > in the text, because HTML uses this character to indicate an HTML command. You can, however insert a < or a > by entering:
"& l t ;" for < and a "& g t ;" for >


This Section provides examples of TEXTOP controls.

Textops are controls returning text responses.

text This is an example of a single line textop. The size of the edit box in characters can be set to whatever size you like. In this case it has been set to 40.

The size controls only the number of characters displayed in the box. The field will actually accept up to 4000 characters (truncating after that limit is reached).

To use this set:
Input=textop
DisplayType=text
EditSize=A number representing the number of characters to display.

IMAGE:TEXOP_text_Exampl1.gif

textarea

This is an example of a single column multi-line textop. The size of the edit box in characters can be set to whatever size you like. In this case it has been set to 40 columns and 20 rows.

The size controls only the number of characters displayed in the box. The field will actually accept up to 4000 characters (truncating after that limit is reached), automatically adding a scroll bar as required.
To set the dimensions of the box put enter a string of two numbers separated by a "." (a string of the form "rows"."columns")

To use this set:
Input=textop
DisplayType=textarea
EditSize=rows.columns

IMAGE:TEXOP_textarea_Exampl1.gif

textarea / dtextarea - WYSIWYG
This is an example of a single column multi-line textop with the WYSIWYG editor enabled. The editor supports simple formatting such as bold, italics, dot points, links, justification as well as copying and pasting. Picture insertion is also supported but you should use HTTP urls or the picture reference will be local file refernces only - images are not uploaded automatically. The size of the edit box in characters can be set to whatever size you like.

The size controls only the number of characters displayed in the box without scrolling. The field will actually accept up to 4000 characters (truncating after that limit is reached), automatically adding a scroll bar as required.
To set the dimensions of the box enter a string of two numbers separated by a "." (a string of the form "rows"."columns"). Both the dtextarea and textarea input controls support the WYSIWYG editor

To use this set:
Input=textop
DisplayType=textarea
EditSize=rows.columns

property "WYSIWYG"="True"

IMAGE:TEXOP_dtextareaWYSIWYG_Exampl1.gif

dtextarea
This is an example of a multi column, multi-line textop. The size of the edit box in characters can be set to whatever size you like. In this case it has been set to 60 columns and 20 rows.

The size controls only the number of characters displayed in the box. The field will actually accept up to 4000 characters (truncating after that limit is reached), automatically adding a scroll bar as required.
To set the dimensions of the box put enter a string of two numbers separated by a "." (a string of the form "rows"."columns")

To use this set:
Input=textop
DisplayType=dtextarea
EditSize=rows.columns

IMAGE:TEXOP_dtextarea_Exampl1.gif

numeric This is an example of a numeric 'only' text field. Only numbers are accepted (if JavaScript is enabled) on the browser. Other wise it is the same as the single line text input control.

To use this set:
Input=textop
DisplayType=numeric
EditSize=A number representing the number of characters to display.

IMAGE:TEXOP_numeric_Exampl1.gif

password This is an example of a password text field. Characters entered are not echoed. Otherwise it is the same as the single line text input control.

To use this set:
Input=textop
DisplayType=password
EditSize=A number representing the number of characters to display.

IMAGE:TEXOP_password_Exampl1.gif


property This is an example of a property text field. Characters entered are applied to a property of the user. Typically this might be a "title" or "age" value, or any other value that is a property of the user entering the data.
Otherwise it is the same as the single line text input control.

The current value for the TITLE property entered here is:
To insert a property value into a question text simple enter <property-name > in the body of the question.

To use this set:
Input=textop
DisplayType=property
EditSize=A number representing the number of characters to display.
OpGroupID=The property to edit.

IMAGE:TEXOP_property_Exampl1.gif

file This is an example of a file upload text field. The control allows for the browsing of a file on the users computer and the uploading of the contents to the folders table of the database. The path value is the directory listing by which the file will be stored in the folders table.
Otherwise it is the same as the single line text input control.

The size field in this instance is used to indicate the width of the path text box.

To use this set:
Input=textop
DisplayType=file
EditSize=A number representing the number of characters to display.

IMAGE:TEXOP_file_Exampl1.gif

admlist - user options This is an example of an admlist text field. The control allows for a 'temporary' selection list. There are multiple ways for seleion list style input controls to be built. This is the simplest.

When using this control to get a simle drop down list of selectable options, set the question properyy ("admlist" ) to a list of the options you want to apear in the selector box. The return value will be the string selected OR "Nil", which will be interpreted by the SM engine as a "no response".

The list members should be separated by spaces or commas. If you want to include spaces in a list option, surround it with "".

Otherwise it is the same as the single line text input control.

The size field in this instance is used to indicate the number of options to display in the list box. A value of 1 creates a drop-down list, while any value greater than one creates a scrolling list..

To use this set:
Input=textop
DisplayType=admlist
EditSize=A number representing the number of characters to display.
Question property "admlist"=the list of options to display. eg:"My First Option","My Second Option","My Third Option"

IMAGE:TEXOP_admlistDROPLIST_Exampl1.gif

admlist - user options This is an example of an admlist text field. The control allows for a 'temporary' selection list. There are multiple ways for seleion list style input controls to be built. This is the simplest.

When using this control to get a simle drop down list of selectable options, set the question properyy ("admlist" ) to a list of the options you want to apear in the selector box. The return value will be the string selected OR "Nil", which will be interpreted by the SM engine as a "no response".

The list members should be separated by spaces or commas. If you want to include spaces in a list option, surround it with "".

Here we have set the size field to a number greater than 1, which creates a list rather than a drop list.

Otherwise it is the same as the single line text input control.

The size field in this instance is used to indicate the number of options to display in the list box. A value of 1 creates a drop-down list, while any value greater than one creates a scrolling list..

To use this set:
Input=textop
DisplayType=admlist
EditSize=A number representing the number of rows to display.
Question property "Admlist"=the list of options to display. Eg: "My First Option","My Second Option","My Third Option"



IMAGE:TEXOP_admlist_Exampl1.gif


admlist This is an example of an admlist text field populated with the reserved administration action list commands. This is a special kind of list used to manage surveys on line. In combination with appropriate "rules", the survey listing control and the user checkilst control, it allows commands to be issued to publish a survey to a group of users, to lock or unlock access to the survey, and to distribute the survey to those users.

When using this control to get a simle drop down list of selectable options, DO NOT set the question properyy ("admlist" ). The default action is to insert this list of options and "Nil", which will be interpreted by the SM engine as a "no response".

Here we have set the size field to a number greater than 1, which creates a drop list.

Otherwise it is the same as the single line text input control.

The size field in this instance is used to indicate the number of options to display in the list box. A value of 1 creates a drop-down list, while any value greater than one creates a scrolling list..

To use this set:
Input=textop
DisplayType=admlist
EditSize=A number representing the number of characters to display.
Question property "admlist"=not set

IMAGE:TEXOP_admlistDEF_Exampl1.gif

admlist - user options, multi This is an example of an admlist text field with the question's Multiple property set to "True". The standard control allows only a single response, while with the multiple property set to true, multiple responses can be strored. When this is used, each response will occupy a seperate record in the respnse table. It is necessary to keep the combined questionID+reponse option string to less than 50 characters (or atleast to keep the first 50 unique in each option).

The control allows for a 'temporary' selection list. There are multiple ways for seleion list style input controls to be built. This is the simplest.

When using this control to get a simle drop down list of selectable options, set the question properyy ("admlist" ) to a list of the options you want to apear in the selector box. The return value will be the string selected OR "Nil", which will be interpreted by the SM engine as a "no response".

The list members should be separated by spaces or commas. If you want to include spaces in a list option, surround it with "".

Here we have set the size field to a number greater than 1, which creates a list rather than a drop list.

Otherwise it is the same as the single line text input control.

The size field in this instance is used to indicate the number of options to display in the list box. A value of 1 creates a drop-down list, while any value greater than one creates a scrolling list..

To use this set:
Input=textop
DisplayType=admlist
EditSize=A number representing the number of characters to display.
Question property "Admlist"=the list of options to display. Eg: "My First Option","My Second Option","My Third Option"
Question property "Multiple"=True

IMAGE:TEXOP_admlistMULTI_Exampl1.gif

This Section provides examples of DATEOP controls.


Dateops are controls returning text date responses.


date This is an example of an date text field. The control allows for the insertion of a date in the form "day / month / year". Invalid dates are rejected.



Otherwise it is the same as the single line text input control.

Combined with the dateop section of the response options table it is possible to create a named date range to define the valid range of dates.

The size field is ignored.

To use this set:
Input=dateop
DisplayType=date
Response Options, dateop=range name, from date, to date


IMAGE:DATEOP_date_Exampl1.gif

datepick This is an example of an date pick field. The control allows for the insertion of a date from a pop-up date pick box. Javascript is required on the browser, but no other applets or activex objects.

Invalid dates are rejected. Combined with the dateop section of the response options table it is possible to create a named date range to define the valid range of dates.

Otherwise it is the same as the single line text input control.

The size field sets the length of the text field.

To use this set:
Input=dateop
DisplayType=datepick
Response Options, dateop=range name, from date, to date

IMAGE:DATEOP_datepick_Exampl1.gif IMAGE:DATEOP_datepick_Exampl2.gif


text This is an example of simple date text field. The control allows for the insertion of a date in the form "day / month / year" or "1 January, 1998". Invalid dates are rejected.

Otherwise it is the same as the single line text input control.

Combined with the dateop section of the response options table it is possible to create a named date range to define the valid range of dates.

The size field sets the length of the text box in characters.

To use this set:
Input=dateop
DisplayType=text
Response Options, dateop=range name, from date, to date

IMAGE:DATEOP_text_Exampl1.gif

This Section provides examples of RATINGOP controls.

Ratingops are controls returning text numeric responses.

numeric This is an example of an numeric text field. The control allows for the insertion of a numbers with range checking. Invalid values are rejected.

Otherwise it is the same as the single line text input control.

Combined with the ratingop section of the response options table it is possible to create a named number range to define the valid range of numbers, the maximum number of characters in a number and whether the number is integer only, or allows a floating point (decimal).

The size field is ignored.

To use this set:
Input=ratingop
DisplayType=numeric
Response Options, ratingop=range name, from number, to number, discrete (True/False), Max Size


IMAGE:RATOP_numeric_Exampl1.gif


text This is an example of an numeric text field. The control allows for the insertion of a numbers with range checking. Invalid values are rejected.

Otherwise it is the same as the single line text input control.

Combined with the ratingop section of the response options table it is possible to create a named number range to define the valid range of numbers, the maximum number of characters in a number and whether the number is integer only, or allows a floating point (decimal).

The size field is ignored.

To use this set:
Input=ratingop
DisplayType=text
Response Options, ratingop=range name, from number, to number, discrete (True/False), Max Size


IMAGE:RATOP_text_Exampl1.gif


This Section provides examples of CHECKOP controls.

Checkops are controls returning text checkbox(True/False) responses.

checkbox This is an example of a simple checkbox field. The control allows for the insertion of a simple check box question. More complex forms of checkboxes and other selectors are available in in the selectops section.

Otherwise it is the same as the single line text input control, except that, by default the question text is right justified so that the input checkbox sits beside the question text.

The size field is ignored.

To use this set:
Input=checkop
DisplayType=checkbox


IMAGE:Checkbox_Exampl1.gif

This Section provides examples of SELECTOP controls.

Selectops are controls returning selected response or performing various types of actions from a shared list of options.
The selectops group is probably the most heavilly used group of input controls. The common element to these controls is that they all use a subset of the response options tables called the selectops to find a list. Selectop lists are SHARED by all surveys in an organisation, which means that you need to be careful about the other surveys using the selectop set. This is done so that responses between questions and surveys can be compared.

Contrast this to the admlist, which allowed for a locally (question specific) selection list. The admlist solution does not guarantee that succeeding quesitions will have the same spelling of the option returned. In a selectop, this is guaranteed, not just between questions in a survey, but between surveys themselves.

radio This is an example of a simple radio button field. The control allows a list of options found in the selectops response options table to be displayed as a radio button list.

A variety of properties are available for use with radio buttons. Here we have used the "RadioFrmt" property with "width=100%" to spread the buttons horizontally across the full width of the input column. The default action is to left justify the buttons list, but this can result in some confusion if the buttons 'bunch up'.

The size field is ignored.

To use this set:
Input=selectop
DisplayType=radio
Property "RadioFrmt"="width=100%"


IMAGE:SELOP_radioHNB_Exampl1.gif


radio This is an example of a simple radio button field. The control allows a list of options found in the selectops response options table to be displayed as a radio button list.

Here we have used the "RadioFrmt" property to add a border arround the controls, which can help if the option text is too long resulting in bunching of the words. We have also set the width to a fixed width so that the words fit on one line. As you can see the radio buttons are actually presented in a table.

Many other format options relevant to HTML tables can also be applied

The size field is ignored.

To use this set:
Input=selectop
DisplayType=radio
Property "RadioFrmt"="border=1 width=400px align=center"


IMAGE:SELOP_radioHB_Exampl1.gif


radio This is an example of a simple radio button field. The control allows a list of options found in the selectops response options table to be displayed as a radio button list.

Here we have used the "RadioAln" property to convert the default horizontal display into a left justified vertical display .

The size field is ignored.

To use this set:
Input=selectop
DisplayType=radio
Property "RadioAln"="Vert"


</td>

IMAGE:SELOP_radioV_Exampl1.gif


list This is an example of a list using the previous radio button response options. The control allows a list of options found in the selectops response options table to be displayed as a drop down or fixed list.

The size field determines how many items to display at once, 1 indicates a drop down list, while a number greater than 1 shows a fixed list of that length.

Note, that as a list the nil 'no response' option is automatically added. This is to allow for the option of not selecting a list option, as with the radio buttons, where you can choose not to select a radio button at all.

To use this set:
Input=selectop
DisplayType=list
EditSize=1


IMAGE:SELOP_droplist_Exampl1.gif


list This is an example of a list using the previous radio button response options. The control allows a list of options found in the selectops response options table to be displayed as a drop down or fixed list.

The size field determines how many items to display at once, 1 indicates a drop down list, while a number greater than 1 shows a fixed list of that length.

Note, that as a list the nil 'no response' option is automatically added. This is to allow for the option of not selecting a list option, as with the radio buttons, where you can choose not to select a radio button at all.

To use this set:
Input=selectop
DisplayType=list
EditSize=6


</td>

IMAGE:SELOP_list_Exampl1.gif


droplist This is an example of a droplist using the previous radio button response options. The control allows a list of options found in the selectops response options table to be displayed as a drop down list. This is the same as the list option with editsize=1.

Note, that as a list the nil 'no response' option is automatically added. This is to allow for the option of not selecting a list option, as with the radio buttons, where you can choose not to select a radio button at all.

To use this set:
Input=selectop
DisplayType=droplist


</td>

IMAGE:SELOP_droplist_Exampl1.gif


button This is an example of a button list using the previous radio button response options. The control allows a list of options found in the selectops response options table to be displayed as a button list.

To use this set:
Input=selectop
DisplayType=button


IMAGE:SELOP_button_Exampl1.gif

label This is an example of a label list using the previous radio button response options. The control allows a list of options found in the selectops response options table to be displayed as a list of selectable labels.

To use this set:
Input=selectop
DisplayType=button


</td>

IMAGE:SELOP_label_Exampl1.gif

checkbox This is an example of a checkbox list using the previous radio button response options. The control allows a list of options found in the selectops response options table to be displayed as a list of selectable checkboxes.

To use this set:
Input=selectop
DisplayType=checkbox


IMAGE:SELOP_checkbox_Exampl.gif

This Section provides examples of SELECTOP JUMP controls.

Selectop Jumps are controls performing various types of jump actions from a shared list of options held in the selectops response table.
The selectops group is probably the most heavilly used group of input controls. The common element to these controls is that they all use a subset of the response options tables called the selectops to find a list. Selectop lists are SHARED by all surveys in an organisation, which means that you need to be careful about the other surveys using the selectop set. This is done so that responses between questions and surveys can be compared.

The selectops entries used in the jumps are built as follows: OpDisplayStr=The prompt to display (as for normal selectop list fields OpValStr=The SID to which to jump. Depending on the behaviour required, other arguments may be required, such as the OID, PID, RK, etc.

</td></tr>

jsmbutton This is an example of a simple survey selecting button (returning) jump list. The control allows a list of named surveys as options found in the selectops response options table to be displayed as a button list and jumped to, with a return to the current sruvey start on completion. The jumped survey is displayed in the same window as the current survey.

Note - destinations for these jumps are SURVEYS.

It uses the SIDO, PIDO, RKO, IIDO OIDO fields to provide a return address, so the PID, RK, IID, and OID fields could be overridden if desired.

The OpValStr must contain the destination SID. If other fields, such as the calling survey's IID or PID (etc), is to be overriden for the destination survey, they should be added to the OpValStr in the selectops table as follows:

MyNextSurvey&IID=February

The size field is ignored.

To use this set:
Input=selectop
DisplayType=jsmbutton



IMAGE:Jsmbutton_Exampl1.gif


jsmlabel This is an example of a simple label returning jump list. The control allows a list of named surveys as options found in the selectops response options table to be displayed as a clickable label list and jumped to, with a return to the current survey start point on completion. The jumped survey is displayed in the same window as the current survey.

Note - destinations for these jumps are SURVEYS.

It uses the SIDO, PIDO, RKO, IIDO OIDO fields to provide a return address, so the PID, RK, IID, and OID fields could be overridden if desired.

The OpValStr must contain the destination SID. If other fields, such as the calling survey's IID or PID (etc), is to be overriden for the destination survey, they should be added to the OpValStr in the selectops table as follows:
MyNextSurvey&IID=February

The size field is ignored.

To use this set:
Input=selectop
DisplayType=jsmlabel



IMAGE:Jsmlabel_Exampl1.gif

jsmwbutton This is an example of a simple window opening button jump list. The control allows a list of named surveys as options found in the selectops response options table to be displayed as a button list and "jumped to". The jumped survey is displayed in a NEW window without disturbing the current survey.

Note - destinations for these jumps are SURVEYS.

It uses the SIDO, PIDO, RKO, IIDO OIDO fields to provide a return address, so the PID, RK, IID, and OID fields could be overridden if desired.

The OpValStr must contain the destination SID. If other fields, such as the calling survey's IID or PID (etc), is to be overriden for the destination survey, they should be added to the OpValStr in the selectops table as follows:

MyNextSurvey&IID=February

This is the most common way to display a menu

To use this set:
Input=selectop
DisplayType=jsmwbutton



IMAGE:Jsmwbutton_Exampl1.gif


jbutton This is an example of a simple window opening button jump list with NO CONTEXT. The control allows a list of named URLs as options found in the selectops response options table to be displayed as a button list and "jumped to". The jumped URL is displayed in a NEW window without disturbing the current survey.

The button does not assume a returning position, and requires a complete URL (ie. it does not assume a SurveyManager Survey is the jump destination).

The OpValStr contains a full URL.

This is the most common way to display a menu for non BPCSM jump destinations.

To use this set:
Input=selectop
DisplayType=jbutton



IMAGE:Jbutton_Exampl1.gif

jlabelThis is an example of a simple window opening label jump list with NO CONTEXT. The control allows a list of named URLs as options found in the selectops response options table to be displayed as a label list and "jumped to". The jumped URL is displayed in a the same window without any mechanism to return to the current survey.

The button does not assume a returning position, and requires a complete URL (ie. it does not assume a SurveyManager Survey is the jump destination).

The OpValStr contains a full URL.

This is the most common way to display a menu for non BPCSM jump destinations.

To use this set:
Input=selectop
DisplayType=jlabel



</td>

IMAGE:Jlabel_Exampl1.gif

jfbutton This is an example of a simple window opening button jump list preserving the current SM form values. The control allows a list of named URLs as options found in the selectops response options table to be displayed as a button list and "jumped to". The jumped URL is displayed in a NEW window without disturbing the current survey.

The button does not assume a returning position, and requires a complete URL (ie. it does not assume a SurveyManager Survey is the jump destination). Unlike the jbutton, it submits the entire form content of the current survey page to the destination URL. In this way a survey page can be used to call a non-survey manager URL, but submit the Survey page's values in the post. Thus an SM form can be used as a form to another web application if the calling page's field names and id's are named to match those required by the destination.

The OpValStr contains a full URL.

This is the most common way to use a BPCSM survey as a web form for another web app.

To use this set:
Input=selectop
DisplayType=jfbutton



IMAGE:Jbutton_Exampl1.gif

jflabel This is an example of a simple label jump list preserving the current SM form values. The control allows a list of named URLs as options found in the selectops response options table to be displayed as a label list and "jumped to". The jumped URL is displayed in the same window as the current survey.

The label does not assume a returning position, and requires a complete URL (ie. it does not assume a SurveyManager Survey is the jump destination). Unlike the jlabel, it submits the entire form content of the current survey page to the destination URL. In this way a survey page can be used to call a non-survey manager URL, but submit the Survey page's values in the post. Thus an SM form can be used as a form to another web application if the calling page's field names and id's are named to match those required by the destination.

The OpValStr contains a full URL.

This is the most common way to use a BPCSM survey as a web form for another web app in the same window as the current survey.

To use this set:
Input=selectop
DisplayType=jflabel



IMAGE:Jlabel_Exampl1.gif


This Section provides examples of ADMINOP controls.

Adminop controls perform various survey system administration functions.
The selectops group is probably the most heavilly used group of input controls. The common element to these controls is that they all operate on the survey system tables - so be careful with these as they result in permanent changes to the SM infrastructure.


admlist This is an example of an admlist text field populated with the reserved administration action list commands. This is a special kind of list used to manage surveys on line. In combination with appropriate "rules", the survey listing control and the user checkilst control, it allows commands to be issued to publish a survey to a group of users, to lock or unlock access to the survey, and to distribute the survey to those users.

When using this control to get a simle drop down list of selectable options, DO NOT set the question properyy ("admlist" ). The default action is to insert this list of options and "Nil", which will be interpreted by the SM engine as a "no response".

Here we have set the size field to a number greater than 1, which creates a drop list.

Otherwise it is the same as the single line text input control.

The size field in this instance is used to indicate the number of options to display in the list box. A value of 1 creates a drop-down list, while any value greater than one creates a scrolling list..

To use this set:
Input=textop
DisplayType=admlist
EditSize=A number representing the number of characters to display.
Question property "admlist"=not set

IMAGE:AdmlistEmpl1.gif


cbxuser This control provides alist of the current organisation members with a checkbox attached to oeach one so that they can be flagged for some action checked in the rules.

IMAGE:Cbxuser_example1.gif


filelist</td>This control provides a selectable list of the files in the current organisation's folder list

IMAGE:filelist_Exampl1.gif


filermdr This control provides a mechanism to upload a reminder for the current survey.

IMAGE:filermdr_Exampl1.gif


instdlist This control provides a selectable list of the instances available for the current survey

IMAGE:instdlist_Exampl1.gif


siddlist This control provides a selectable list of surveys in the current organisation

IMAGE:Sidlist_Exampl1.gif


userlogin

This control provides a login combo

IMAGE:Userlogin_Exampl1.gif


usermaker This control provides a control for creating new users.

IMAGE:Usermaker_Exampl1.gif


BackLinks



CopyRight Bishop Phillips Consulting Pty Ltd 1997-2012 ( BPC SurveyManager - Questions and Input Controls )
Personal tools