Skip to content

Instantly share code, notes, and snippets.

@taleeb35
Created September 19, 2014 14:51
Show Gist options
  • Save taleeb35/747762edf3cb72c9048d to your computer and use it in GitHub Desktop.
Save taleeb35/747762edf3cb72c9048d to your computer and use it in GitHub Desktop.
<?php
echo $this->Form->create('Country', array('action' => 'find'));
echo $this->Form->input('name',array('id' => 'Autocomplete'));
echo $this->Form->submit();
echo $this->Form->end();
?>
<script type="text/javascript">
$(document).ready(function($){
$('#Autocomplete').autocomplete({
source:'<?= $this->Html->url(array("controller" => "countries","action"=> "find")); ?>',
minLength:1
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment