View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 07791 | Bug reports | Survey taking | public | 2013-04-23 10:11 | 2013-04-24 11:06 |
| Reporter | andrewb | Assigned To | c_schmitz | ||
| Priority | normal | Severity | minor | ||
| Status | closed | Resolution | duplicate | ||
| Product Version | 2.00+ | ||||
| Summary | 07791: Issues with rendering Time questions with Date/Time Question Type | ||||
| Description | There appears to be an issue with rendering a question with Date/Time. I have a simple Date/Time question with the value set to: H:i, set to 30 min increments. But when the survey is rendered out, the Minute part isn't working, so I started looking into this and noticed that when the question renders out that it appears like this: (The full rendering is found under "Additional Information". <input type="text" onchange="checkconditions(this.value, this.name, this.type)" alt="Answer" maxlength="10" "="" h:i");="" value="date(" id="answer298662X1X4" style="display: none" name="298662X1X4" size="10" class="text"> The value field gets all screwed up, because the survey is rendering two sets of double quotes. My thoughts on the issue and where the problem is can be found below in the Additional Information section. | ||||
| Steps To Reproduce | First setup a question like: Run the survey. | ||||
| Additional Information | Thoughts on the issue. I found that in the file: $answer .= '<input class="text" type="text" size="10" name="'.$ia[1].'" style="display: none" id="answer'.$ia[1].'" value="'.$SESSION['survey'.Yii::app()->getConfig('surveyID')][$ia[1]].'" maxlength="10" alt="'.$clang->gT('Answer').'" onchange="'.$checkconditionFunction.'(this.value, this.name, this.type)" /> When I created a dump of the $_SESSION variable I found the following. [298662X1X4] => Array The default value stood out to me of [defaultvalue] => date("H:i"); This would cause the following to be rendered: value="date("H:i");" Which of course closes the tag too quickly. I'm yet to find where that part is generated from. Full Sample Question Rendering: <td class="questiontext">
<option value="">Minute</option><option value="0">00</option><option value="30">30</option></select><input type="text" onchange="checkconditions(this.value, this.name, this.type)" alt="Answer" maxlength="10" "="" h:i");="" value="date(" id="answer298662X1X4" style="display: none" name="298662X1X4" size="10" class="text"> <input type="hidden" name="qattribute_answer298662X1X4" id="qattribute_answer298662X1X4"> <input type="hidden" value="H:i" id="dateformat298662X1X4"> </div> </td> | ||||
| Tags | No tags attached. | ||||
| Bug heat | 2 | ||||
| Complete LimeSurvey version number (& build) | 130406 | ||||
| I will donate to the project if issue is resolved | No | ||||
| Browser | Firefox | ||||
| Database type & version | MySQL | ||||
| Server OS (if known) | Linux | ||||
| Webserver software & version (if known) | Litespeed Server | ||||
| PHP Version | 5.3 | ||||
| Git branch / Pull Request URL | |||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2013-04-23 10:11 | andrewb | New Issue | |
| 2013-04-23 11:27 | mfaber | Issue Monitored: mfaber | |
| 2013-04-24 11:06 | c_schmitz | Relationship added | duplicate of 07792 |
| 2013-04-24 11:06 | c_schmitz | Status | new => closed |
| 2013-04-24 11:06 | c_schmitz | Assigned To | => c_schmitz |
| 2013-04-24 11:06 | c_schmitz | Resolution | open => duplicate |