Hi there everybody.
This is my first post in this forum. I am in the process of learning this framework and am busy building a sample project just to get some insight into the functionality of this brilliant framework.
I do have a problem though that I’ve been trying to figure out for the last seven days but can’t seem to figure it out and I think I’m just being stupid.
What I want to achieve:
Search field with autocomplete dropdown function. I want to be able to type something into the search field and a dropdown should show with possible values. These values will be retrieved from table attribute fields in a MYSQL table. I would also like to have a dropdown-list next to the field which allows me to choose the category to search in. Once a value has been selected by mouse click the field should be populated with this value and upon a click of a search button the MYSQL database table should be queried and the browser redirected to the specific entry’s URL. The search will be done according to the autocompleted value as well as the category from the dropdown list
An example of what I’m trying to build is exactly similar to Amazon.com’s search field.
I have literally gone trough every tutorial and discussion I could find but could not even get the autocomplete from database working and I haven’t even considered the dropdown (category) menu or the search button. I really don’t know where to go next so I thought I would come look for some help here. The attributes that I need to use is breed(values represented in normal html dropdown menu with default set as All) and name(autocomplete field with autocomplete values retrieved from this database). A search button will then be clicked and a search would be executed in on the id associated with the name entered, thus search will not be done on the value itself. Thus needing a key and value combination (I guess using a hidden field).
Please help will really be appreciated. As I’ve indicated I have tried every tutorial and discussion available and couldn’t achieve success and I couldn’t even find one that would achieve exactly what I want to do.
Thank you in advance!!