====== Questionnaires for Smartphones ======

Modern mobile phones often offer Internet access and an Internet browser. So what could be more obvious than using these smartphones for surveys? There are three different cases:

  * ** The questionnaire should work everywhere**\\ Often, participants should just be able to complete the questionnaire - regardless of whether they are using a laptop, tablet or smartphone.
  * **Questionnaire for mobile devices only**\\ Some study designs, such as diary studies or mobile experience samples, are designed to be completed on the mobile device only.
  * ** Questionnaire for computers only**\\ Other study designs are unsuitable for smartphones, e.g. when a task requires a great deal of information to be displayed on the screen at the same time or when response times are to be recorded at the touch of a button. In this case, you want to make sure that the questionnaire is not filled in on the smartphone.


===== Questionnaire for all devices =====

**Note:** Not every questionnaire is suitable for filling out on the small display of a smartphone. Long scale batteries (more than 10 items) are no more fun on the small display than long question texts/instructions or long stimulus texts. Not to mention the fact that you like to fill out a 5-minute questionnaire on the bus, but probably not a questionnaire that takes 30 minutes. Therefore, scientific questionnaires are often not suitable for the small mobile phone display, regardless of the presentation.


Approximately every fifth person who completes a questionnaire on SoSci Survey uses a mobile device. Tablets are unproblematic: They offer sufficiently large screens and all types of questions in SoSci Survey can be answered just as easily by touch (touch display) as with the mouse. With smartphones, however, the small display can become a problem.


Basically any common smartphone browser can display an Internet page so small that it fits completely on the display. However, you can neither read the texts nor hit the buttons for the answers. The keyword "Responsive Layout" refers to various techniques that ensure that an Internet page can be displayed meaningfully on displays of different sizes. Essentially, unimportant elements are hidden on small displays and the remaining elements are shown in a different arrangement (e.g. below each other instead of next to each other).


The standard layouts of SoSci Survey (with the exception of "SoSci Smartphone" and "SoSci Survey Paper") are designed to automatically adapt to the available screen width. A maximum width is set in the questionnaire layout so that the questionnaire is not stretched too much on large screens. However, there are two major restrictions for small displays:

  * In the questionnaire there are usually no unimportant elements (questions, answer options) that could be omitted.
  * Not every type of question requires as little space as you like.

On the small screens of smartphones, questions that use a lot of text (e.g. long item texts) or offer many options cause problems. In addition, some question types, such as the ranking question, require items and answer options to be displayed side by side as cards at the same time.


==== Optimizations ====

We recommend the following optimizations so that the questionnaire can be completed sensibly on smartphones:

  * Use short texts.
    * The greeting should not contain more than 4 sentences plus a greeting formula.
    * Explain filling in questions (e.g. a Likert scale) only once when the question appears for the first time in the questionnaire.

  * Avoid  [[:en:create:combine]] --  especially if you want to compress more questions into less space. If the questionnaire becomes too long without combined questions, ask again about the suitability of the questionnaire for smartphones.
  * For scale questions, set the //arrangement// to "dynamic" or "automatic".
  * For selection questions, use "dynamic" (standard) or, even better, "small cards" as the display. Cards take up more space, but are much easier to hit with your finger on a small display.
  * The question type "Selection sequence" is particularly easy to operate on touch devices, as the answer options are also very simple here. In addition, there is no additional click on "Next".
  * You may want to use "larger" or "very large" selection fields in the  [[:en:create:layout]]  in the tab //Basic settings// for the option Type of //selection fields// so that they are easier to select.
  * If you use audio or video files, integrate them using HTML 5 ([[:en:create:media]]) and make sure that all video formats are converted so that they can also be played on mobile devices (pixel size, data rate, etc.).
  * Do not insert manual line breaks into items and texts, but use dollar signs ($$) to determine where the text should not break ([[:de:create:texts#wiki-notation]])


==== Filters for smartphone users ====

With the question type "Device and transmitted variables" you can find out whether a participant completes the questionnaire using a smartphone:

  * Create a question of the type "Device and transmitted variables".
  * On the Device tab, select Format.
  * Drag the question to the page where you want to filter - or to the first page of the questionnaire.

This question stores whether the participant's browser identifies his or her device as a computer, tablet or smartphone. For example, if the question has the identifier "GG01", the following PHP code shows smartphone users the question "FM01" and all other users the question "FS01".

<code php>
if (value('GG01_FmF') == 5) {
  question('FM01');
} else {
  question('FS01');
}
</code>


The following PHP code only displays question "FS02" if the participant is not using a smartphone. Detailed explanations of filters can be found under [[:en:create:filters]].

<code php>
if (value('GG01_FmF') != 5) {
  question('FS02');
}
</code>

**Hint:** The question type "Device and transmitted variables" can also record the screen size of the user. This information may be more useful for some filters than the device format. However, the question must be placed on the page before the filter at the latest (not on the same page as the filter).


==== Separate questionnaire ====

It is possible to submit a completely different questionnaire to smartphone users than to other users. This can be useful if, for example, other content is to be displayed on a larger scale and/or if the questionnaire is to use a completely different layout for smartphone users (e.g. "SoSci Smartphone").

  * You can optionally use the questionnaire layout "SoSci Smartphone", which has been optimized for the display of questionnaires (only) on small displays:
    * Activate the layout "SoSci Smartphone" under **Questionnaire Layouts**.
    * If you have previously used the standard layout (no other layout active), also activate the standard layout or any other layout of your choice (otherwise the "normal" questionnaire will only be shown in smartphone size in the future).
  * Create a second questionnaire or a copy of the questionnaire under **Compile Questionnaire** in the tab page //Additional Questionnaires//.
  * In the new questionnaire in the //Settings// tab, optionally set the "mobile" identifier and the "SoSci Smartphone" layout. Which identification you enter is up to you, you should only clearly recognize the mobile version. Save your changes.
  * Go to the original questionnaire and choose the questionnaire that you have just created under Settings for Smartphone Variant. Save the change.

Smartphone users are now automatically redirected to the new questionnaire when calling the main questionnaire.

**Important:** Changes to a question are copied to all questionnaires that use the question. If you want to modify a question for display on the smartphone/in the second questionnaire, create a copy of this question ({{:button.copy.gif?nolink}}) and exchange the old question for the new question under **Compile Questionnaire** in the second questionnaire.




===== Questionnaires for Smartphones only =====


If the questionnaire is only to be completed on smartphones, the same [:en:create:optimizations]] as above apply. It may also make sense to use the [[:en:create:layout]] "SoSci Smartphone". This layout offers comparatively little space for questions -- but shows them with a correspondingly large font.

Scales have a special display for narrow screens (select in the first tab). Furthermore, with the question type "Scale (with intermediate values)", the scale points can be displayed as a dropdown -- this can be clearer, especially with long answer options.

Depending on the study design, the following chapters may also be helpful:


  * [[:en:create:waves#tagebuchstudie|Multi-wave interviews: Diary study]]
  * [[:en:create:waves#mobile_experience_sampling_method_mesm|Multi-wave interviews: Mobile Experience Sampling Method (MESM)]]

Sometimes it is necessary to reject participants who want to access the questionnaire with a desktop computer or laptop. This is similar to the procedure described above ([[#filter_for_smartphone users|Filter for smartphone users]]).

  * Unordered List ItemA functional block of type "Device and transmitted variables" is required to determine the //format// of the device and place it before the filter in the questionnaire (see [ #filter_for_smartphone users|above]]).

In addition, a text is created ([[[:en:create:texts]]]), which for example has the identification "GG02" and politely informs the participant to edit the questionnaire via mobile device.


For the following code example, it is assumed that the block "Device and transmitted variables" has the identifier "GG01" and the text has the identifier "GG02". The following PHP code is placed as the first element on the first page of the questionnaire. It already integrates "GG01" using '[[:de:create:functions:question]]]'', so that the module "GG01" no longer needs to be placed separately in the questionnaire.


<code php>
question('GG01'); // Integrate functional block GG01 to determine the device format
if ((value('GG01_FmF') == 1) or (value('GG01_FmF') == 2)) {
  text('GG02');   // Show text
  buttonHide();   // Hide buttons so that the questionnaire can no longer be completed
}
</code>


**Note:** This PHP code allows filling using Tablet. To prohibit this too, add a check or (value('GG01_FmF') == 2) in the IF filter.


**Note:** The PHP code is designed to avoid inadvertent filling on the wrong device. Through targeted manipulation, participants may also be able to fill out the questionnaire on a device that should not be allowed: some browsers (e.g. Chrome) can emulate a mobile device, other browsers can transmit a fake browser identification.


===== Questionnaire for computers only =====

Some content is not suitable for smartphones or even tablet computers. These could be for example...


  * Unordered List ItemComplex combined questions that compactly retrieve detailed information
  * Ranking questions that require a lot of space, or questions that should measure an implicit setting based on reaction times, e.g. a [[:en:create:questions:iat|IAT]] (both are also possible on smartphones in principle but may not be desired for methodological reasons)
  * Tests that require a keyboard and/or mouse as input device
  * Videos to be viewed in a quiet environment (not on the public transport bus) on a computer with speakers
  * Images of Internet pages as they look on a normal computer whose contents would not be visible on a small smartphone display

You can use filters to inform subscribers who use a mobile device that it is not suitable for filling in the form. The procedure is equivalent to rejecting participants in smartphone studies (see above).

  * Create question/module "Device and transmitted variables" (e.g. "GG01")
  * Create friendly text (e.g. "GG02")
  * Display the text at the beginning of the questionnaire using a filter Participants with a mobile device

<code php>
question('GG01'); // Integrate functional block GG01 to determine the device format
if ((value('GG01_FmF') == 4) or (value('GG01_FmF') == 5)) {
  text('GG02');   // Show text
  buttonHide();   // Hide buttons so that the questionnaire can no longer be completed
}
</code>

Use the **Variables overview** to determine the possible values of the device format for the filter. Code 4 describes a mobile device whose format cannot be exactly determined, Code 5 describes in Smartphone.

