BootStrap Smart Form Series 10 auto-complete component support

Source: Internet
Author: User

Web development, certainly encountered like Baidu, Google this search function bar, that intelligent form of automatic completion can do what, the following to announce:

1, including like Google, Baidu and other similar simple search

2, complex structure support, such as input product number, need to product number, product name, product price, product notes, etc. fill in the form of a location

The code is as follows (page address: https://github.com/xiexingen/Bootstrap-SmartForm/blob/master/demo/form3-ele-autocomplete.html):

Auto-complete

Note: JS files need to be introduced: Jquery-ui.js, jquery.fn.extend.js

Call the Smartsearch method by specifying an element after form generation is complete
Parameter description:

URL: Requested URL

Beforesearch: Optional, the method to be called before sending the request, the method has a parameter data containing the information to be sent, if you need to add or modify the parameters to be sent, modify the secondary parameters can be

Formatitem: Optional, if the return is not a simple array string, then the required custom action, used to format the interface display content, the example shows the product number + product Name

Callback: Optional, if the return is not a simple array string, a custom action is required to assign a value

Note: If the interface returns a simple array of strings, both Formatitem and callback can be omitted

This is what I run in my local test project:

For detailed usage, please refer to Demo

Previous chapter:BootStrap Smart Form series nine support for form picture uploading

Next chapter:BootStrap Smart Form Series 11 Cascade dropdown support

Series Home: BootStrap smart Form Series Home

BootStrap Smart Form Series 10 auto-complete component support

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.