Fb:typeahead-input

From Facebook Developer Wiki

Jump to: navigation, search

Contents

Description

This tag is currently in beta. Please post bugs in the Bug Tracker.

Creates a type-ahead tool (as suggested) that will give you the results that you specify. To add options in the input box, use fb:typeahead-option.


Attributes

RequiredNameTypeDescription
required name string The variable name that is sent in the POST request when the form is submitted.
optional autocomplete string Set to off to prevent the browser's autocomplete feature from overriding this tag's ability to autocomplete.
size int The size of the input field.
value string The pre-selected option value.


Examples

<fb:fbml version="1.1"> <fb:typeahead-input name="your_input_name" autocomplete="off" value="default selection"> <fb:typeahead-option value="me"><fb:name uid=1160 capitalize=yes linked=no /></fb:typeahead-option> <fb:typeahead-option value="ex">x</fb:typeahead-option> <fb:typeahead-option>why</fb:typeahead-option> </fb:typeahead-input> </fb:fbml>


Notes

  • The tag must be wrapped in a fb:fbml tag with version 1.1.
  • You must name the input.
  • You must set autocomplete="off" to prevent the browser's autocomplete from overriding this tag's.

Known Issues

  • In profile boxes, the autocomplete options cannot extend beyond the edges of the box the application owns.
  • HTML and FBML that generates HTML inside of fb:typeahead-option is being interpreted as literal HTML

Bug Reports

reference