WordPress.org

Ready to get started?Download WordPress

Forums

How to use jQuery UI Autocomplete plugin in custom fields. (4 posts)

  1. TC.K
    Member
    Posted 2 years ago #

    Hi,
    I wonder is there anyone using jQuery UI Autocomplete plugin in their site? If so, can you tell me how to implement it into custom fields??

    Thanks

  2. TC.K
    Member
    Posted 2 years ago #

    Nevermind, I figure it out...
    turn out it is so simple, just include the custom field Div id into the function, and it's done.

    (jQuery)( "#custom_field_id" ).autocomplete({
    			source: to_ur_source
    		});
  3. kvhrao
    Member
    Posted 2 years ago #

    Hi WP_Dummy

    I am new to the wordpress.
    Can you please help me with the steps how to add autocomplete to the wordpress.
    I have created php page, database, when I upload to my hosting it is working fine, but I do not know how to add those in to the wordpress.

    Thanks & Regards
    Rao

  4. ahmedshaikhm
    Member
    Posted 2 years ago #

    @kvhrao: You can use suggest as well, its quite simple.

    // php part
      wp_enqueue_script( 'jquery' );
      wp_enqueue_script( 'suggest' );
    // javascript part
      $('#suggest').suggest("/path/to/suggestions",{
         onSelect: function() {
           alert("You selected: " + this.value );
         }
      });
    // html part
    <input type="text" id="suggest" name="keyword" />

Topic Closed

This topic has been closed to new replies.

About this Topic