Incorporating a Searchable Dropdown with Bootstrap 4 in Google Apps Script

Recently, I attempted to incorporate a search feature using Bootstrap-select into my dropdown menu for Google Apps Script.

Despite following this resource and including the necessary CDN and JS files from this location, I encountered difficulties implementing it into my Google Apps Script Webapp. The dropdown menu appears, but lacking the search functionality.

Below is the code I used - can someone please identify what I may have done incorrectly?

uform.html:

  
        <!doctype html>
    <html lang="en">
      <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
    
        <link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1d7f7272696e696f7c6d5d28332d332d307f78697c2f">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">e;
    
        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
    
      </head>
      <body>
      
        <div class="container">
          <ul class="nav nav-tabs" id="myTab" role="tablist">
          <li class="nav-item" role="presentation">
        <button class="nav-link active" id="home-tab" data-bs-toggle="tab" data-bs-target="#home" type="button" role="tab" aria-controls="home" aria-selected="true">Home</button>
      </li>
... [remaining HTML code trimmed for brevity]
     

functions.gs:

function getSalesCaseOwnerDropdown(){

const ss = SpreadsheetApp.getActiveSpreadheet();
const ws = ss.getSheetByName("CaseOwners");
return ws.getRanage(2, 1, ws.getLastRow()-1, 1).getValues();

}

What my Result Looks Like:

Screenshot from Webapp The addition of a search box would greatly enhance this setup.

Thank you in advance!

Answer №1

Make sure to include the stylesheet in your head section after the bootstrap stylesheets.

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="60020f0f1413141201104d13050c">

Then, add the script into the body of your HTML file:

<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="ccaea3a3b8bfb8beadbce1bfa9a0a9afb88cfde2fdffe2fdf8">[email protected]</a>/dist/js/bootstrap-select.min.js

Ensure that you maintain the order of scripts for proper functionality and styling adjustments.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Include a text input and a span element inside an ASP.NET ListView

I am working on an asp.net listview that includes a column with 2 input buttons (id=Start, id=Stop), 1 text input (id=TimeMinutes), and 1 span (id=spCountDown). The generated HTML for these controls within the listview looks like this... <table id="ctl ...

Is Axios phasing out support for simultaneous requests?

According to the current axios documentation, there is a section that is not very well formatted: Concurrency (Deprecated) It is advised to use Promise.all instead of the functions below. These are helper functions for managing concurrent requests. axio ...

Implement dynamic configuration injection by allowing users to specify the name of a configuration file during runtime, instead of having it fixed in the code

In my development using webpack, I am exploring ways to make my application configurations more dynamic. Presently, the project is a create-react-app that has been ejected. For instance, when creating a local build in my package.json file, I include the f ...

Using `getJson` to parse the tree structure

I am currently working with a JSON file that contains order data. The structure of the JSON file is as follows: { "orders": [ {"name": "Peter", "email": "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="64140110011624050b0 ...

Submission event in jQuery fails to trigger

I'm struggling with submitting a form in jQuery <form id="solicitud" action="ventas.php?content=nuevo" method="post"> ... </form> Even though I have the code to submit the form, it's not working as expected $("#nombres").click(fu ...

Connecting subscribe functions in Meteor React Native

I've been working on a react native app using meteor and the library react-native-meteor. I've run into an issue where I need to make a series of calls one after the other, such as signing in, subscribing to data, and so on. In my actual code, i ...

Utilizing MEAN.js for uploading images

Following a tutorial on the MEAN stack, I am looking to implement an image upload feature using MongoDB on a server. Resources: Angular directive for file uploads create-spot.client.view.html <div data-ng-controller="SpotsCreateController"> &l ...

I'm fresh to the world of Angular and I'm looking to display a modal with form details to confirm before submitting the form

Instead of immediately submitting the details when signing up, I would like to show the form details filled by the user in a modal first. The user can then choose to submit the form or go back and edit the details. Using Angular, how can we implement a fe ...

Error in Typescript occurrence when combining multiple optional types

This code snippet illustrates a common error: interface Block { id: string; } interface TitleBlock extends Block { data: { text: "hi", icon: "hi-icon" } } interface SubtitleBlock extends Block { data: { text: &qu ...

Update CSS transparency using PHP

My project involves a heart icon that changes appearance when hovered over, fading into a full heart instead of just an outline. If the user has already liked the heart, it should display as solid pink by default. I planned on checking if the user had like ...

Encountering a problem while trying to launch the development server for a React application using the npm-start

I followed the steps to create a react application using npx create-react-app myapp, but when I use npm start, it fails to start a developer server. Even after trying to reinstall the node_modules, the issue persists. I am using the latest versions of Reac ...

Angular push introduces a new operator that leads to a MongoError being triggered

I'm currently following along with a tutorial on the mean stack, which can be found here One of the features I am working on is implementing a delete function to remove items from the database when a button is clicked. In my client side controller, ...

Leverage the power of Angular to seamlessly integrate jQuery code across your

Interested in incorporating the plugin into my AngularJS project. To achieve this, I have to: $(document).ready( function() { $("html").niceScroll(); } ); The challenge is figuring out where to place this code so that it runs site-wide and ...

Using setInterval with Internet Explorer 10

In Internet Explorer 10, the setInterval function does not work properly. I have a web page where, upon form submission, a lengthy process is triggered on the server to download a file. To keep users updated on the progress, I utilize setInterval to repeat ...

Modify the color scheme of an HTML webpage

Looking to enhance my HTML page with a new feature. The page is responsive and currently using Bootstrap CSS and JS. My goal is to allow users to change the color of the page dynamically by selecting a background or text color. Check out this example link ...

Is it possible to utilize both the /app and /pages folders in my Next 13 application?

I am currently working on a project where the /app folder is utilized as the primary route container. However, we have encountered performance issues on localhost caused by memory leaks identified in an issue on the Next.js repository. I am curious to fi ...

Using three.js to create a hover effect that highlights the edges of a cube with LineSegmentsGeometry

I am currently utilizing LineSegmentsGeometry and LineMaterial to render thick cube edges. My objective is to dynamically change the color of the edge when it is hovered over. const edgesGeometry = new LineSegmentsGeometry().fromEdgesGeometry( new THREE. ...

Error: props.addPost does not exist as a function

Help Needed with React Error: props.addPost is not a function. I am trying to add a new post in my app. Please assist me. import React from "react"; import classes from "./MyPosts.module.css"; import { Post } from "./Post/Post.jsx& ...

What exactly are AngularJS module dependencies and how do they work together?

After exploring the tutorial example provided on AngularJs's site ( here) (The main HTML appears to be quite minimal with only ng-view and ng-app=phonecatApp included) Within the app.js file, we find: var phonecatApp = angular.module('phoneca ...

Why isn't the tooltip function functioning properly in Bootstrap 5 beta1 when using an SVG image?

Currently, I am utilizing Bootstrap 5 beta1. However, I have encountered an issue. When I use a tooltip with a button, it works fine. But if I use a tooltip with an icon (svg, feather icon), it doesn't work. In other instances, when I use a tooltip ...