Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Custom question attributes?

More
8 years 10 months ago #120408 by garvsaxena
Replied by garvsaxena on topic Custom question attributes?
Hey thanks for your support.

I have one more issue that according to my clients need we need a custom question type which include listbox(drop down list) followed by a text field. and many more type of question. So can you please suggest me that from where and how can we create a new question type. Please help me out its very urgent!!!
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 10 months ago #120423 by tpartner
Replied by tpartner on topic Custom question attributes?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
8 years 10 months ago #120428 by garvsaxena
Replied by garvsaxena on topic Custom question attributes?
if we want to edit in the Question Index section, then how can I do this
The topic has been locked.
More
8 years 10 months ago #120510 by garvsaxena
Replied by garvsaxena on topic Custom question attributes?
Hey Fresh Lemon..how r u?
Actually I have a question regarding lime survey. I have to edit in the Question Index section and could not find the template file regarding this, can you please tell me that which file is responsible for Question Index Section on the Survey Question Page.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 10 months ago #120524 by tpartner
Replied by tpartner on topic Custom question attributes?
What changes do you want to make? There is no .pstpl file for the index. Associated styles can be found in template.css.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: garvsaxena
The topic has been locked.
More
8 years 10 months ago #120528 by garvsaxena
Replied by garvsaxena on topic Custom question attributes?
Thanx a lot for replying..!

Actually I want to make this Question Index as DropDown Menu on the top of the survey page, currently it is displaying on the right.
The topic has been locked.
More
8 years 10 months ago #120529 by garvsaxena
Replied by garvsaxena on topic Custom question attributes?
Thanks for your reply first..!

Actually I want to make Question Index like DropDown Menu on the top of the survey, currently this is displaying on the right side of the survey page.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 10 months ago - 8 years 10 months ago #120533 by tpartner
Replied by tpartner on topic Custom question attributes?
You can do that with a little JavaScript and CSS.

Add this to the end of template.js:
Code:
$(document).ready(function() {
 
  // Custom question index
 
  if($('#index').length > 0) {
    $('body').addClass('with-dropdown-index');
 
    $('#progress-wrapper').after($('#index'));
    $('#index .container').wrapInner('<div class="inner-container" />');
    $('#index h2').insertBefore($('#index .inner-container')).append('<span class="ui-icon ui-icon-arrowthick-1-s"></span><span style="display:none" class="ui-icon ui-icon-arrowthick-1-n"></span>');
 
    $('#index h2').click(function() { 
      $('#index .inner-container').slideToggle(300, function() {
        if($('#index .inner-container').is(':visible')) {
          $('#index h2 .ui-icon-arrowthick-1-s').hide();
          $('#index h2 .ui-icon-arrowthick-1-n').show();
        }
        else {
          $('#index h2 .ui-icon-arrowthick-1-n').hide();
          $('#index h2 .ui-icon-arrowthick-1-s').show();
        }
      });
    });
  }
 
});

And then add something like this to the end of template.css (these are for the default template):
Code:
/* Custom Dropdown Question Index */
.with-dropdown-index .outerframe {
  margin: 0;
}
 
.with-dropdown-index #index {
  position: relative;
  right: auto;
  top: auto;
  width: 25em;
  height: auto;
  margin: 0 auto 0.5em auto;
  overflow: auto;
  background: #fff;
  border: 1px solid #AAAAAA;
}
 
.with-dropdown-index #index .container {
  width: auto;
}
 
.with-dropdown-index #index h2 {
  position: relative;
  padding: 0.5em;
  background: #EEEEEE;
  text-align: center;
  cursor: pointer;
  color: #444444;
}
 
.with-dropdown-index #index h2 .ui-icon {
  position: absolute;
  top: 0.5em;
  right: 1em;
    display: inline-block;
  margin: 0 0 0 1em;
  background-image: url(images/ui-icons_888888_256x240.png);
}
 
.with-dropdown-index #index .inner-container {
  display: none;
}




Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 8 years 10 months ago by tpartner.
The following user(s) said Thank You: tammo, Perry
The topic has been locked.
More
8 years 10 months ago #120581 by garvsaxena
Replied by garvsaxena on topic Custom question attributes?
Hey thanx for your great help, its really appreciated.! Actually I m looking for the menu like this..please have a look on the below screenshot.


Attachments:
The topic has been locked.
More
8 years 10 months ago #120582 by Ben_V
Replied by Ben_V on topic Custom question attributes?

Actually I m looking for the menu like this


Such display changes requiere a lot of development, probably out of the scope of this forum...
BTW you may need be interested in this old post ; there is maybe some elements you can adapt .

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The following user(s) said Thank You: DenisChenu
The topic has been locked.
More
8 years 10 months ago #120680 by garvsaxena
Replied by garvsaxena on topic Custom question attributes?
Hey everyone..!!
I have a question which I have to implement in lime survey. Actually I have to set a Chained Dropdown Question Type in LimeSurvey. It means that If we choose the Country from the Drop Down List, then the Drop Down List of State is automatically populated with the correspondent data according to the country chosen.

I am wondering that how can we achieve this.?? Can anyone help me out as it is very important and urgent...
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 10 months ago #120681 by tpartner
Replied by tpartner on topic Custom question attributes?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose