Example #1
0
<?php

$page_title = 'Documentation';
$active_nav_tab = 'Docs';
include APP_PATH . 'pages/header.php';
$examples = AC::getExamples();
$docs = AC::getDocs();
?>

<div class="section">
<h2 id="config_object">Config Object</h2>
<p>The Config Object initializes the AutoComplete widget.</p>
<p>You define your <a href="docs#list_object">List Objects</a> - which control which options are available to the user - on the <a href="docs#config_object:lists"><code class="js plain">lists</code></a> property.</p>
<p>As a shorthand method, you can provide an array of <a href="docs#option_object">Option Objects</a> to the config object and it will be expanded as the default list for the widget. See the <a href="examples#1000">Simple List Example</a>.</p>
<p>As another shorthand method, you can provide a single string value and AutoComplete assumes it's an AJAX url. See the <a href="examples#2000">Simple AJAX example</a>.</p>
<table cellspacing="0">
<thead>
<tr>
  <th>Property / Type</th>
  <th>Required</th>
  <th>Default</th>
  <th>Description</th>
  <th>Example</th>
</tr>
</thead>
<tbody>
<?php 
foreach ($docs['Config Object'] as $prop) {
    echo buildPropRow('config_object', $prop, $examples);
}
?>