Question type - File upload

From LimeSurvey Manual
Jump to: navigation, search
Other languages:Deutsch 80% • ‎English 100% • ‎español 10% • ‎日本語 20% • ‎Nederlands 90% • ‎slovenščina 90%

Contents


Short description

The file upload question type (available in v1.91 or newer) can be used to collect file(s) from a user in response to a question. For example, a company with employment opportunities could use this question to request the candidate to submit/upload his resume as well as photograph and other scanned documents in the employment survey.

File-upload-screenshot.png

This question gives the survey designer the ability to restrict the files that can be uploaded by the user in response to the question. For example, the survey administrator can allow only PNG, JPG and JPEG images which are less than 1 MB in size.

Core settings

Relevance equation

Notice.png
Hint: This features is available starting in version 1.92


Description

If the value of the relevance equation is "1" or "true", the question is "relevant" in the survey context, i.e. it is shown to the survey participant. If not, the question is hidden. All questions let you specify a relevance equation. Relevance is the successor to conditions and supports much more complex conditional logic.

Syntax Highlighting

Whenever you save the relevance equation, it will be evaluated and syntax-highlighted. Any errors will be color coded so that you can quickly detect and fix them.

Valid values

Any equation, using Expression Manager syntax, without surrounding curly braces.

Examples

Here are good examples of syntax highlighting


Advanced settings

Show title (show_title)

Show the title textbox so that the user can enter a suitable title/subject for the uploaded file



Show Comment (show_comment)

Show the comment textbox so that the user can enter any comments corresponding to this uploaded file



Maximum file size allowed (max_filesize)

The maximum size of a file that should be allowed to be uploaded by the user.

Example

If the maximum filesize is set to 1024 KB, any files larger than 1024 KB will be discarded, and the user will be asked to upload a smaller file.

Note: The final value shown to the survey participant is also depending on PHP settings, like post_max_size and upload_max_filesize. Of all three possible values (upload_max_filesize, post_max_size and max_filesize) the lowest one will be shown and used.



Maximum number of files (maximum_number_of_files)

The maximum number of files that can be uploaded in response to this question.

Valid values

  • Any positive integer
  • Any number (will be rounded to integer) (New in 1.92 )
  • Any SGQA code (New in 1.92 )
  • Any question code (variable name) (New in 1.92 )
  • Any equation, using Expression Manager syntax, without surrounding curly braces. (New in 1.92 )



Minimum number of files (minimum_number_of_files)

The minimum number of files that must be uploaded in response to this question.

Valid values

  • Any positive integer
  • Any number (will be rounded to integer) (New in 1.92 )
  • Any SGQA code (New in 1.92 )
  • Any question code (variable name) (New in 1.92 )
  • Any equation, using Expression Manager syntax, without surrounding curly braces (New in 1.92 ) .



Allowed file types (allowed_filetypes)

Description

The file types that are allowed to be uploaded in response to this question. The file types are entered in comma separated values (CSV) format.

Example

For a file that needs images to be uploaded, one may enter

JPG, jpeg, png



Randomization group name (random_group)

Notice.png
Hint: This features is available starting in version 1.92


Description

Place questions into a specified randomization group, all questions included in the specified group will appear in a random order.

Valid values

Just enter any string you like (for example: 'group1'). All question which have set the same string will have their place in the survey randomized (=randomly exchanged among each other).



Always hide this question (hidden)

Description

If you prefill a question by URL you can use this setting to hide the question and its value from the survey participant at all. This overrides any conditions because the particular question is never even embedded in a page. If you just want to hide a question (for example if you want to store a value calculated on the fly) then use Javascript embedded in the question source code.

Notice.png
Hint: The question are not diplay in HTML, it can be set with an equation question or survey URL, but not in javascript

Available options

  • On
  • Off (default)



Insert page break in printable view (page_break)

Description

This attribute is only active when you actually print a survey from the Printable View. It forces a page break before the question. (Only the Opera browser does not need this since it handles the page breaks accordingly.)

Available options

  • Yes
  • No (default)