View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
06482 | Bug reports | Survey taking | public | 2012-08-14 23:42 | 2012-09-20 14:12 |
Reporter | lolo | Assigned To | c_schmitz | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 2.00RC8 | ||||
Fixed in Version | 2.00+ | ||||
Summary | 06482: Default values of hidden fields are not saved when taking survey | ||||
Description | When defining a hidden field with a default value, the field value is not saved when the survey is taken / submitted. The survey answers table contains a column for the hidden field, but it is always set to NULL. Tested with RC8. | ||||
Steps To Reproduce | 1) create survey 2) add question group 3) add question #1 (visible):
3) add question #2 (hidden):
4) edit answer options for question #2:
5) edit default answers for question #2:
6) activate survey 7) take survey
8) browse survey answers 9) inspect survey answers table | ||||
Additional Information | Sample survey joined in attachment. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 6 | ||||
Complete LimeSurvey version number (& build) | 120803 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | Safari 5.1.7 (Mac) | ||||
Database type & version | Mysql 5.5.24 | ||||
Server OS (if known) | Linux 2.6.27.52 | ||||
Webserver software & version (if known) | Apache 2 | ||||
PHP Version | 5.3.14 | ||||
Update: Just re-read my synopsis and description: |
|
Thomas, is that supposed to work? |
|
This works properly in 1.92+. Default values for hidden variables are saved. |
|
In browser responses the hidden field is shown - it's hard to see because that question has no question text. (and so that particular row no header). TMSWhite: Where in EM is the logic to save the default value for a hidden question? Because I can't find it... |
|
Carsten- This code in em_manager_helper.php::_ValidateQuestion() sets the default values:
And this code, in ProcessCurrentResponses() saves the hidden default values to the database:
However, there is a bug in that code - it should be $_SESSION[$LEM->sessid], not $SESSION['survey'.$LEM->sessid], which is probably the source of the error. |
|
Fix committed to Yii branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=9417 |
|
Thank you very much for the hint! |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2012-08-14 23:42 | lolo | New Issue | |
2012-08-14 23:42 | lolo | File Added: survey_archive_957581.zip | |
2012-08-14 23:49 | lolo | Note Added: 20427 | |
2012-08-15 00:13 | c_schmitz | Assigned To | => c_schmitz |
2012-08-15 00:13 | c_schmitz | Status | new => assigned |
2012-08-19 00:32 | c_schmitz | Note Added: 20514 | |
2012-08-19 00:32 | c_schmitz | Assigned To | c_schmitz => TMSWhite |
2012-08-19 00:32 | c_schmitz | Status | assigned => feedback |
2012-08-19 07:08 | TMSWhite | Note Added: 20519 | |
2012-08-19 07:08 | TMSWhite | Assigned To | TMSWhite => |
2012-08-19 08:43 | c_schmitz | Assigned To | => c_schmitz |
2012-08-19 08:43 | c_schmitz | Status | feedback => assigned |
2012-08-19 18:44 | c_schmitz | Note Added: 20531 | |
2012-08-20 12:50 | c_schmitz | Assigned To | c_schmitz => TMSWhite |
2012-08-20 12:50 | c_schmitz | Status | assigned => feedback |
2012-08-20 16:04 | TMSWhite | Note Added: 20552 | |
2012-08-20 16:04 | TMSWhite | Assigned To | TMSWhite => c_schmitz |
2012-08-20 16:04 | TMSWhite | Status | feedback => assigned |
2012-08-22 23:49 | c_schmitz | Changeset attached | => LimeSurvey Yii 5b83d048 |
2012-08-22 23:49 | c_schmitz | Note Added: 20571 | |
2012-08-22 23:49 | c_schmitz | Resolution | open => fixed |
2012-08-22 23:49 | c_schmitz | Note Added: 20572 | |
2012-08-22 23:49 | c_schmitz | Status | assigned => resolved |
2012-08-22 23:49 | c_schmitz | Fixed in Version | => 2.00+ |
2012-09-20 14:12 | c_schmitz | Status | resolved => closed |