View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
06309Bug reportsSurvey editingpublic2012-07-18 16:33
ReporterDenisChenu Assigned ToDenisChenu  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version1.92+ 
Fixed in Version1.92+ 
Summary06309: Bad javascript alert for Multiple choice with "Other option"
Description

In multi option question, mandatory with other, if the user check the other checkbox and click next whole question are shown in javascript alert.

But it can be very bad with:

  • Javascript inside question
  • Table or other big think in qestion text.
Steps To Reproduce

Import joined survey.
Launc a test
Click on checkbox for other
Click Next

Additional Information

Think it's best to have:
"Please also fill in the \"other comment\" field.

TagsNo tags attached.
Attached Files
Bug heat6
Complete LimeSurvey version number (& build)120704
I will donate to the project if issue is resolvedNo
BrowserFF12
Database type & versionMysql 5
Server OS (if known)debian/linux
Webserver software & version (if known)apache
PHP VersionPHP Version 5.3

Users monitoring this issue

There are no users monitoring this issue.

Activities

user20590

2012-07-10 14:16

  ~19686

https://github.com/jositopr/LimeSurvey/commit/2233ee2273d7c256e7551e5ddd6c214914a9ec96

DenisChenu

DenisChenu

2012-07-10 14:24

developer   ~19687

Thanks jositopr,

But maybe it's a good solution to have his control in Expression Manager :)

DenisChenu

DenisChenu

2012-07-10 14:27

developer   ~19688

Hello Tom,

I look to add this in Expression Manager (other_comment_mandatory part).

I try with:
case 'M': //Multiple choice
$eqn = "( strlen(trim(" . $sgqa . "other.NAOK))>1))";
break;

(after set if($type=='M'){$qattr['other_comment_mandatory']=1;})
But then i have if() javascript error.

Do you have an idea ?

Denis
PS: if not : then jositopr is a good solution.

DenisChenu

DenisChenu

2012-07-10 17:37

developer   ~19691

Quick and dirty solution:
. "alert('".sprintf($clang->gT("You've marked the '%s' field, please also fill in the accompanying comment field.","js"),$othertext)."');\n"

(use $othertext if attribute other_replace_text is set)

DenisChenu

DenisChenu

2012-07-11 12:09

developer   ~19701

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=8954

DenisChenu

DenisChenu

2012-07-11 12:19

developer   ~19702

Fix committed to Yii branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=8955

DenisChenu

DenisChenu

2012-07-11 12:19

developer   ~19703

TODO : move it to EM

DenisChenu

DenisChenu

2012-07-11 20:31

developer   ~19713

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=8969

DenisChenu

DenisChenu

2012-07-11 20:33

developer   ~19714

Fix committed to Yii branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=8970

c_schmitz

c_schmitz

2012-07-18 16:33

administrator   ~19777

1.92+ version released.

Related Changesets

LimeSurvey: master 9e506613

2012-07-11 03:07:12

DenisChenu

Details Diff
Fixed issue 06309 : Bad javascript for Multiple choice with "Other option"
Dev : if question is mandatory : checked in $mandatoryTip
Dev : if not, input.text is selected when click in cbox
Dev : TODO : move it in Expression manager
Affected Issues
06309
mod - qanda.php Diff File

LimeSurvey: Yii 590b055b

2012-07-11 03:16:38

DenisChenu

Details Diff
Fixed issue 06309 : Bad javascript for Multiple choice with "Other option"
Dev : if question is mandatory : checked in $mandatoryTip
Dev : if not, input.text is selected when click in cbox
Dev : TODO : move it in Expression manager
Affected Issues
06309
mod - application/helpers/qanda_helper.php Diff File

LimeSurvey: master 74656104

2012-07-11 11:28:29

DenisChenu

Details Diff
Dev : better fix 06309 : othercbox are not need, then hide in CSS Affected Issues
06309
mod - qanda.php Diff File

LimeSurvey: Yii c50def60

2012-07-11 11:30:46

DenisChenu

Details Diff
Dev : better fix 06309 : othercbox are not need, then hide in CSS Affected Issues
06309
mod - application/helpers/qanda_helper.php Diff File

Issue History

Date Modified Username Field Change
2012-07-09 20:24 DenisChenu New Issue
2012-07-09 20:24 DenisChenu File Added: limesurvey_survey_46647.lss
2012-07-10 14:16 user20590 Note Added: 19686
2012-07-10 14:24 DenisChenu Note Added: 19687
2012-07-10 14:25 DenisChenu Assigned To => TMSWhite
2012-07-10 14:25 DenisChenu Status new => assigned
2012-07-10 14:27 DenisChenu Note Added: 19688
2012-07-10 17:37 DenisChenu Note Added: 19691
2012-07-11 10:56 DenisChenu Assigned To TMSWhite => DenisChenu
2012-07-11 12:09 DenisChenu Changeset attached => LimeSurvey master 9e506613
2012-07-11 12:09 DenisChenu Note Added: 19701
2012-07-11 12:09 DenisChenu Resolution open => fixed
2012-07-11 12:19 DenisChenu Changeset attached => LimeSurvey Yii 590b055b
2012-07-11 12:19 DenisChenu Note Added: 19702
2012-07-11 12:19 DenisChenu Note Added: 19703
2012-07-11 12:19 DenisChenu Status assigned => resolved
2012-07-11 12:19 DenisChenu Fixed in Version => 1.92+
2012-07-11 20:31 DenisChenu Changeset attached => LimeSurvey master 74656104
2012-07-11 20:31 DenisChenu Note Added: 19713
2012-07-11 20:33 DenisChenu Changeset attached => LimeSurvey Yii c50def60
2012-07-11 20:33 DenisChenu Note Added: 19714
2012-07-18 16:33 c_schmitz Note Added: 19777
2012-07-18 16:33 c_schmitz Status resolved => closed
2019-11-01 17:25 c_schmitz Category Survey design => Survey editing