Is there a way to get autocomplete in a ui element in Google Apps Script?

前端 未结 3 1363
感情败类
感情败类 2021-02-06 19:14

I\'d like to have a Listbox or similar, where the user could start typing, and the Listbox would narrow down the choices depending on what has already been typed, and autocomple

3条回答
  •  孤街浪徒
    2021-02-06 19:53

    It's fairly easy in HtmlService and a bit harder in UiApp although doable. Here's an HtmlService example:

    Code File

    function getGroup(group) {
      return GroupsApp.getGroupByEmail(group).getUsers().map(
        function(user){return user.getEmail(); });
    }
    
    function doGet() {
      return HtmlService.createHtmlOutputFromFile("ui");
    }
    

    Html file named 'ui'

    
      
      
      
    
      Enter a group name in the first box. The second box will autocomplete
      group members using GroupApp.
      

提交回复
热议问题