Inhaltsverzeichnis

option()

void option(string option, mixed setting)

The appearance of a page in the questionnaire can be altered with option(). The command option() can be put on every page in the questionnaire where the appearance should be altered simply by using PHP code. The following options and possible – differing depending on the option – settings are available:

Note: The command option() is only suitable for changing the labels of buttons on individual pages. If you want to change the labeling in general, define then in Text Elements and Labels (Instructions for Common Jobs).

Note: In general, if you do not want to display a progress bar, disable it in Compose QuestionnaireSettingsDisplay progress bar.

Note: The option 'resume' is helpful if you want to pause the survey on purpose at a certain place – e.g. to conduct multiple survey waves in the same questionnaire (buttonHide()). The option must be placed before the participant leaves the questionnaire, e.g. right at the beginning of the page. Pausing the questionnaire at a specific place can be achieved by hiding the Next button with option("nextbutton", false).

Progress Bar

The following PHP code ensures that the progress bar is hidden on an individual page (e.g. on the welcome page):

option('progress', 'no');

Adjusting the progress displayed is also possible. When the following PHP code is put on a page in the questionnaire, 30% progress is displayed.

As of version 2.5.00, the progress on following pages will be calculated on the basis of the set value. In older versions of the program, the progress has to be set individually for each page. In general, the progress has to be set individually for previous pages, e.g. if the progress bar should run more “slowly” at the beginning.

option('progress', 30);

Buttons in the Questionnaire

The Back button will be hidden on an individual page with the following PHP code (as long as this button is enabled in the questionnaire):

option('backbutton', false);

If back buttons in the questionnaire are generally disabled, they can be shown again for individual pages:

option('backbutton', true);

When the following PHP code is put on the penultimate page in the questionnaire, the “Next” button is given the label “Submit details” and the “Back” button is given the label “Change details”.

option('nextbutton', 'Submit details');
option('backbutton', 'Change details');

Layout

Should extensive stimulus be displayed in the questionnaire, reflecting a website? The “normal” structure of the questionnaire is probably too narrow to do this and interferes with the appearance.

Open Questionnaire Layout in the menu. If you have not yet activated a layout, activate the “SoSci Survey Standard” layout first of all in Layout Templates (so the questionnaire appears in the default layout). Afterwards, activate the “SoSci Stimulus Presenter” layout – this is given the ID “presenter”.

Use the following PHP code on the page with the stimulus on it, which allows the structure of the questionnaire to disappear:

option('layout', 'presenter');