Skip to content

Instantly share code, notes, and snippets.

@taleeb35
Created September 19, 2014 12:56
Show Gist options
  • Save taleeb35/f37d19bd6cbcacb380d8 to your computer and use it in GitHub Desktop.
Save taleeb35/f37d19bd6cbcacb380d8 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:'<?php=$this->Html->url(array("controller" => "countries","action"=> "find")); ?>',,
minLength:2
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment