# Text\_field\_with\_auto\_complete

**URL:** <https://www.ruby-forum.com/t/text-field-with-auto-complete/148705>\
**Category:** Rails\
**Created:** [September 16, 2008, 1:17pm UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete/148705 "2008-09-16T13:17:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![palani](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed655f/32.png) [@palani](https://www.ruby-forum.com/u/palani)\
**Post date:** [September 16, 2008, 1:17pm UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete/148705/1 "2008-09-16T13:17:27Z")

</div>

Hi,  
How to trigger the text\_field\_with\_auto\_complete after typing the 4  
characters on the text box.can anyone please tell me how set this after  
typing 4 characters.

---

<div class="post-metadata">

**Author:** ![palani](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed655f/32.png) [@palani](https://www.ruby-forum.com/u/palani)\
**Post date:** [September 16, 2008, 1:47pm UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete/148705/2 "2008-09-16T13:47:32Z")

</div>

On Tue, Sep 16, 2008 at 1:17 PM, Palani K.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> How to trigger the text\_field\_with\_auto\_complete after typing the 4  
> characters on the text box.can anyone please tell me how set this after  
> typing 4 characters.

If you want the widget to trigger the Ajax call only if 4 chars or  
more were entered have a look at the :min\_chars option:

> <https://github.com/rails/auto_complete/blob/master/lib/auto_complete_macros_helper.rb>
