0

I have a texbox which has auto suggestion option while typing. I want to restrict user to select option from the suggested list only. currently auto suggestion list appear but user can enter and select his own option. any help please.

jQuery().ready(function() {
    jQuery("#ingr").autocomplete("<?php bloginfo('template_directory');?>/grocery/autocomplete.php", {
        width: 260,
        matchContains: true,

    });
});
Raptor
  • 53,206
  • 45
  • 230
  • 366
  • use Select Option http://www.w3schools.com/tags/att_option_value.asp – sam Nov 18 '13 at 09:41
  • 1
    when the user have selected the option, make the textbox `disabled` – yashhy Nov 18 '13 at 09:42
  • This has already been asked previously : [Link to prev asked question in StackOverflow][1] [1]: http://stackoverflow.com/questions/2909077/jquery-ui-autocomplete-disallow-free-text-entry – Jayanth Ramachandran Nov 18 '13 at 09:44

0 Answers0