@trendoman,
Thanks man, I need to use that validation on search input which I using <cms:searchform> on the page, I don't know how to apply this <cms:input> on in....
For the typeahead, I gave up. I now using this for autocomplete: http://easyautocomplete.com/. It's really easy to use, the function is really good, you can even add the avatar easily. This autocomplete jquery can also use to search approximate string/partial terms/mid-words which typeahead fail to provide. You really need to take a try on this plugin...
I can easily using the JSON file with this plugin, here is the source code:
For the JSON file, which we can converted it in PHP:
In your main file:
Just inserted the PHP file, then your autocomplete should now work as charm.... Please do correct me if I did anything wrong...
Thanks man, I need to use that validation on search input which I using <cms:searchform> on the page, I don't know how to apply this <cms:input> on in....
For the typeahead, I gave up. I now using this for autocomplete: http://easyautocomplete.com/. It's really easy to use, the function is really good, you can even add the avatar easily. This autocomplete jquery can also use to search approximate string/partial terms/mid-words which typeahead fail to provide. You really need to take a try on this plugin...
I can easily using the JSON file with this plugin, here is the source code:
For the JSON file, which we can converted it in PHP:
- Code: Select all
<?php require_once( 'admin/cms.php' ); ?> <cms:template title='productlist' hidden='1' /> <cms:content_type 'application/json'/> [ <cms:pages masterpage='products.php'> {"name": "<cms:addslashes><cms:show k_page_title/></cms:addslashes>"}<cms:if "<cms:not k_paginated_bottom/>">,</cms:if> </cms:pages> ] <?php COUCH::invoke(); ?>
In your main file:
- Code: Select all
<script> var options = { url: "productlist.php", getValue: "name", highlightPhrase: false, list: { maxNumberOfElements: 500, match: { enabled: true }, sort: { enabled: true } } }; $("#s").easyAutocomplete(options); </script>
Just inserted the PHP file, then your autocomplete should now work as charm.... Please do correct me if I did anything wrong...

