Skip to content

nayeem101/form-input-autosuggest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

form-input-autosuggest

This is a simple form input auto suggestion boilterplate/template

This can be used with any backend api or can be used in server side rendering after some little tweaks


Where to make change?

  • In index.html <form action="/data" method="get" autocomplete="off" class="search-form"> change the action attribute with your API endpoint

  • In autoSugest.js async function searchBook(searchText) { let url = "/data.json"; change the url with your API endpoint

  • In autoSugest.js

    function showSuggestion(arr) {
          //other codes
        b.addEventListener("click", function (e) {
            ...
            form.action = "/data/" + id;
            ...
        }
        //other codes
      }
    
  • change form.action with your API endpoint

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published