View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
04927User patchesSurvey at runtimepublic2011-02-03 17:312012-06-21 13:23
Assigned Tomdekker 
Product Version1.90 
Target VersionFixed in Version1.91 
Summary04927: added SurveyGroupQuestion identifier as a variable for use in questions
Descriptionsometimes people use javascript in the question text field to do special things with a question. It is often necessary in this js to reference the input field element of the question, which has an html id in the format of AnswerSxGxQ. Instead of hard-coding the SxGxQ every time, this patch lets users simply use the template replacement marker of "{SGQ}" (without quotes) which will later get replaced with the actual SxGxQ before rendering in the survey.
Steps To ReproduceOnly four lines were added to the code in four separate files:

group.php (for displaying group by group surveys)

question.php (for displaying question by question surveys)

survey.php (for displaying all-in-one surveys)

common_functions.php (handles the actual replacement of text)
Additional InformationThis was based on the install files for 1.9.1 RC3 Build 9642. Nothing else was altered except for the files/lines mentioned in "Steps To Reproduce"

Available at: [^]
TagsNo tags attached.
LimeSurvey build number OR git commit ID9642
Attached Filespatch file icon diff.patch [^] (1,333 bytes) 2011-02-04 17:35 [Show Content]

- Relationships

-  Notes
User avatar (14053)
timbee (reporter)
2011-02-04 17:34

Okay, I built a patch based on the latest SVN source (9742),
attached a a file here...
User avatar (14054)
DenisChenu (developer)
2011-02-05 10:56

Thanks !

Not for 1.90, but maybe for 1.91 or 1.92.
User avatar (14056)
timbee (reporter)
2011-02-06 01:51

groovy, thanks :)
User avatar (14091)
Mazi (developer)
2011-02-08 20:57

Menno, can you review the patch?
User avatar (14119)
mdekker (developer)
2011-02-09 19:59

Sure no problem
User avatar (14120)
mdekker (developer)
2011-02-09 20:38

Committed in svn 9755
Could you please add the documentation to our wiki? [^]

perhaps with a link in the relevant work-around sections with the javascript?

- Issue History
Date Modified Username Field Change
2011-02-03 17:31 timbee New Issue
2011-02-04 17:34 timbee Note Added: 14053
2011-02-04 17:35 timbee File Added: diff.patch
2011-02-05 10:56 DenisChenu Note Added: 14054
2011-02-06 01:51 timbee Note Added: 14056
2011-02-08 20:57 Mazi Assigned To => mdekker
2011-02-08 20:57 Mazi Status new => assigned
2011-02-08 20:57 Mazi Note Added: 14091
2011-02-09 19:59 mdekker Note Added: 14119
2011-02-09 20:38 mdekker Note Added: 14120
2011-02-09 20:38 mdekker Status assigned => resolved
2011-02-09 20:38 mdekker Fixed in Version => 1.91
2011-02-09 20:38 mdekker Resolution open => fixed
2012-06-21 13:23 c_schmitz Status resolved => closed

Copyright © 2000 - 2016 MantisBT Team
Powered by Mantis Bugtracker