View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
07528Feature requestsTheme editorpublic2016-12-13 12:07
ReporterDenisChenu Assigned ToMazi  
PrioritynormalSeverityfeature 
Status closedResolutionfixed 
Summary07528: Extra Class for all question type
Description

Sometimes, wee need to hide some question, or to put some specific class, or to put some javascript workaround etc ....

We can do it like this:
#questionXXXbackground:red
or
$("#questionXXXX").hide();

I think it can be good to have some extra class possibility fo all question type. Then we can have

.importantbackground:red
or
$(".hiding").hide();

For some example.

It offer hability to implement some javascript workaround on template easily, it offer possibility i don't think because extra class can be used by jquery.

Discussion on forum with Tony
http://www.limesurvey.org/forum/can-i-do-this-with-limesurvey/69758-conditions-on-subquestion?limit=10&start=10&lang=en#69854

Additional Information

A possible solution: Add a new field in lime_questions
This is easy for whole question type, and after use directly

    $_question_extraclass = $question['extraclass'];

In replacements function.

And this in $baselang edit of the question edit.

TagsNo tags attached.
Bug heat6
Story point estimate
Users affected %

Relationships

related to 09954 closedMazi Bug reports Port new "cssclass" question attribute feature to new LS3 version 

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2011-11-26 13:03

developer   ~24383

I can look at 1.X or wait 2.preprealpha to woek on LS2.0 yii.

But i like to know what is the best method :
The first mean a SQL update more but it's better
Second mean no SQL update, but i think it's less good.

:)

Mazi

Mazi

2012-11-30 15:05

updater   ~24384

Using a question attribute is definitely the easiest solution to implement this. Simply add an attribute "CSS class name(s)" at which the user can enter specific class name(s) for a certain question. These must be added when generating the HTML code for the question at the survey (previouly done in qanda.php) and can then be used at template.css.

tpartner

tpartner

2012-11-30 15:39

partner   ~24385

We should also look at automatically adding the question code to the question class.

DenisChenu

DenisChenu

2014-06-25 14:53

developer   ~30228

@tpartner : i like the data-code="{QCODE}" ;)

tpartner

tpartner

2014-06-25 15:23

partner   ~30229

@DenisChenu: Or both so it's easier to use CSS in older browsers.

DenisChenu

DenisChenu

2014-06-25 15:50

developer   ~30230

I think we must have {QCODE} like actually, and maybe add {QCODEALLWAYS} ?

Maybe a way to extend:replace Core Replacement Array plugin can be a good solution too.

Denis

Mazi

Mazi

2015-10-08 10:22

updater   ~33322

A feature for adding custom CSS classes to questions will be available at Limesurvey 2.5, see https://github.com/LimeSurvey/LimeSurvey/commit/b9536e41ad325ddc9e697325f78b2bc60cb350b4

Documentation: https://manual.limesurvey.org/QS:CSS_Class

Issue History

Date Modified Username Field Change
2014-06-25 14:53 DenisChenu Note Added: 30228
2014-06-25 15:23 tpartner Note Added: 30229
2014-06-25 15:50 DenisChenu Note Added: 30230
2015-10-08 10:21 Mazi Relationship added related to 09954
2015-10-08 10:22 Mazi Note Added: 33322
2015-12-11 14:40 c_schmitz Category Templates => Theme editor
2016-12-13 12:07 DenisChenu Assigned To => Mazi
2016-12-13 12:07 DenisChenu Status acknowledged => closed
2016-12-13 12:07 DenisChenu Resolution open => fixed
2016-12-13 12:07 DenisChenu Summary Extra Class for all question type => Extra Class for all question type