Welcome to the LimeSurvey Community Forum

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

Default Survey Group

  • sbgmedia
  • sbgmedia's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
4 years 1 month ago #194235 by sbgmedia
Default Survey Group was created by sbgmedia
Hello,

Is there a way in the settings to automatically set a filter on the Survey List page so that only certain group of surveys is shown?

I have two survey groups "Default" and "Expired Surveys". When I click on the Survey List, all surveys are listed but I just want the "Default" surveys to be shown.

Is that possible?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 month ago - 4 years 1 month ago #194249 by tpartner
Replied by tpartner on topic Default Survey Group
Create a custom admin theme with a custom.js file as described here - manual.limesurvey.org/Custom_Admin_Theme...meSurvey_Version_2.5 .

Add something like this to that custom.js file:

Code:
$(document).on('ready pjax:scriptcomplete',function(){
 
    if($('.container-fluid.welcome').length == 0 && $('#survey-grid').length > 0 && $('select#Survey_gsid').val() != 2) {
 
        $('select#Survey_gsid').val(2).closest('form').find('input[value="Search"]').trigger('click');
    }
});

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 4 years 1 month ago by tpartner. Reason: Added condition so it doesn't affect the admin welcome screen.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose