SproutCMS

This is the code documentation for the SproutCMS project

function autofillList()

Returns HTML for an auto-complete list of records

The form data for this field should be an array of arrays with at least the following keys:
[
    'id' => record ID,
    'value' => title text visible in the list item,
    'orderkey' => ordinal value for record ordering
]

Usage

string Form::autofillList ( string $name , array $attrs , array $options );

Arguments

  1. string $name
    Field name
  2. array $attrs
    Unused
  3. array $options
    Options; these are passed to the JS
           lookup_url         string    AJAX lookup URL, Fb::autocomplete; Required
           min_term_length    int       Min term length for autocomplete; default = 3
           reorder            bool      Default = false

Return value

  • string
    HTML