Note that there are some explanatory texts on larger screens.

plurals
  1. POAutosuggest values based on another autosuggested input
    text
    copied!<p>I am working on a library type database. Supposed I want to create 2 input fields (using PHP) each having its own autosuggest capability in order to help filter user's selection. However, the values to be populated in field #2 will be dependent upon the value searched and selected by the user in field #1. I wonder if I should even make the 2nd field inactive until a valid value (that exists in the database) is properly searched and selected in field #1.</p> <p>Field 1: Autosuggesting searches for a list of libraries.</p> <p>Field 2: Upon entering a proper library in field 1, field 2 would be able to autosuggest books that are contained within that library.</p> <p>I want to accomplished this 2-step autosuggest all in one page, as opposed to moving the user to a whole another page in order to search the books within the selected library.</p> <p>I am working with a lot of libraries, so a drop down list doesn't make much sense for field #1.</p> <p>I have a "books_library" table in my database that each has a bookID as well as a library ID showing that it belongs to that particular library. I can easily populate field #2 autosuggest with all the books, the problem is, how do I filter the autosuggest in field #2 based on the library ID generated from field #1?</p> <p>Does anyone know a proper name for this sort of project? I could not find anything like this in google. The closest thing is a drop-down list one after another based on values selected in a previous drown down list. But I am working with a lot more data than drop-downs can provide in a user friendly manner.</p> <p>Please help!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload