Skip to content

Instantly share code, notes, and snippets.

@LinzardMac
Created February 10, 2014 20:59
Show Gist options
  • Save LinzardMac/8924043 to your computer and use it in GitHub Desktop.
Save LinzardMac/8924043 to your computer and use it in GitHub Desktop.
Adding taggable items in autocomplete
if ( 'multi' == pods_var( 'pick_format_type', $options ) && 1 != $pick_limit && taggable='true') {
tags: true,
createSearchChoice: function(term, data) {
if ($(data).filter(function() {
return this.text.localeCompare(term) === 0;
}).length === 0) {
return {
id: term,
text: term
};
}
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment