Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

How can I turn off autocomplete for open ends in SSI Web

Hi ,
Can anyone please tell me how I can turn off autocomplete for open ends in SSI Web?
asked Feb 22, 2012 by Gaurav (260 points)
edited Feb 22, 2012 by Walter Williams
SSI Web 8 automatically takes advantage of the latest jQuery User Interface plug-in. One of the available jQuery UI functions is the Autocomplete widget. This allows you to override whatever is stored in a browser's settings with either a pre-populated list of values or no content at all.  When added to an input field, it enables respondents to quickly find and select from a list of values as they type, leveraging searching and filtering.

To use it, simply add something like the code below to the HTML section of a free-format question field after defining the variable that will be used in the input form, which in this case is Q2_brand. The objective of this sample question is to pre-populate responses with popular automobile brands.

<code>
<script type="text/javascript">
  jQuery(function () {
    var availableBrands = ["Alfa Romeo", "Alpina", "Ariel", "Ascari", "Aston Martin", "Audi", "Bentley", "BMW", "Bristol", "Brooke", "Cadillac", "Callaway", "Campagna", "Caterham", "Chevrolet", "Chrysler", "Citroen", "Corvette", "Daihatsu", "Dodge", "Elfin", "Ferrari", "Fiat", "Ford", "Gumpert", "Holden", "Honda", "Hummer", "Hyundai", "Invicta", "Isuzu", "Jaguar", "Jeep", "Kia", "Koenigsegg", "Lamborghini", "Land Rover", "Lexus", "Lobini", "Lotus", "Marcos", "Maserati", "Maybach", "Mazda", "MB Roadcars", "Mercedes-Benz", "Mini", "Mitsubishi", "Morgan", "NICE", "Nissan", "Noble", "Opel", "Pagani", "Perodua", "Peugeot", "Porsche", "Proton", "Radical", "Renault", "Rolls-Royce", "Saab", "Saturn", "Seat", "Shelby", "Skoda", "Smart", "Spyker", "Ssangyong", "SSC", "Subaru", "Superformance", "Suzuki", "Tata", "Tesla", "Toyota", "TVR", "Unique", "Vauxhall", "Volkswagen", "Volvo", "Westfield"];
    jQuery("#Q2_brand").autocomplete({
      source: availableBrands
    });
  });
</script>

<div class="demo">
  <div class="ui-widget">
    <label for="Q2_brand">Automobile Brand:</label>
    <input type="text" name="Q2_brand" id="Q2_brand" size="20" maxlength="20">
  </div>
</div>
</code>

If you are using the Autocomplete widget, but don't want it to display any variables, simply eliminate the variables. For example, you may swap out the script code above with the code below:

<code>
<script type="text/javascript">
  jQuery(function(){jQuery("#Q2_brand").autocomplete({source: ""});});
</script>
</code>

For more information about the jQuery Autocomplete widget, please visit:
http://jqueryui.com/demos/autocomplete/
thanks Walter Williams.......................:)

1 Answer

0 votes
answered Feb 22, 2012 by Bahadir Ozkurt Gold (17,030 points)
...