Welcome to the LimeSurvey Community Forum

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

survey permission

  • limevives
  • limevives's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 months 2 weeks ago #250731 by limevives
survey permission was created by limevives
Please help us help you and fill where relevant:
Your LimeSurvey version: 5.6.35
Own server or LimeSurvey hosting: Own server
Survey theme/template: 
==================
Hello! How can I sort users by name in survey permission>add user 
See my attachment

thanks
https://imgtr.ee/image/limesurvey.R1pTj 

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 months 2 weeks ago #250752 by tpartner
Replied by tpartner on topic survey permission
Create a custom admin theme and add a custom.js file to that theme - manual.limesurvey.org/Custom_Admin_Theme...eating_a_new_theme_3

Place this in that custom.js file:
 
 
Code:
function sortSelect(thisSelect, firstOptSticky) {
  var selectOptions = $('option', thisSelect);
  if(firstOptSticky) {
    selectOptions = $('option:not(:first)', thisSelect);
  }
 
  selectOptions.detach().sort(function(a, b) {
    var at = $(a).text();
    var bt = $(b).text();
    return (at > bt) ? 1 : ((at < bt) ? -1 : 0);
  });
  selectOptions.appendTo(thisSelect);
}
 
 
$(document).on('ready pjax:scriptcomplete',function(){
 
  if($('#uidselect').length > 0) {    
    sortSelect($('#uidselect'), true);
  }
 
});

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: DenisChenu

Please Log in to join the conversation.

  • limevives
  • limevives's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 months 1 week ago #250860 by limevives
Replied by limevives on topic survey permission
Dear,
Thank you very very much! It works!!
If I want to sort by 'full name' what I need to change?

Best regards
Rustam

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 months 1 week ago #250862 by tpartner
Replied by tpartner on topic survey permission
Without hacking the core code, you can only sort by the values provided by LimeSurvey in the list.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

  • limevives
  • limevives's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 months 1 week ago #250863 by limevives
Replied by limevives on topic survey permission
I mean what I have to write instead #uidselect to sort by 'full name'?

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 months 1 week ago #250864 by tpartner
Replied by tpartner on topic survey permission
#uidselect is a selector for that dropdown. There is no dropdown containing only full names.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

  • limevives
  • limevives's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 months 1 week ago #250865 by limevives
Replied by limevives on topic survey permission
ok, thanks

Please Log in to join the conversation.

  • limevives
  • limevives's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 days 4 hours ago - 3 days 3 hours ago #265260 by limevives
Replied by limevives on topic survey permission
thanks
Last edit: 3 days 3 hours ago by limevives.

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 days 7 hours ago #265280 by DenisChenu
Replied by DenisChenu on topic survey permission

Create a custom admin theme and add a custom.js file to that theme - manual.limesurvey.org/Custom_Admin_Theme...eating_a_new_theme_3

Place this in that custom.js file:

 
Maybe best to activate select2 on this dropdown ?
slect2 can be used in LimeSurvey 6 for admin ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose