Joe Palmer
unread,May 7, 2013, 8:09:50 AM5/7/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to joomla-de...@googlegroups.com
Hello,
I would to implement the new tags interface on a 3rd party input field (using Joomla 3.1.1). I am using a template override so I can customise the output and have added this code:
$chosenAjaxSettings = new JRegistry(
array(
'selector' => '#custom_tags',
'type' => 'GET',
'url' => JURI::root() . 'index.php?option=com_tags&task=tags.searchAjax',
'dataType' => 'json',
'jsonTermKey' => 'like'
)
);
JHtml::_('formbehavior.ajaxchosen', $chosenAjaxSettings);
This seems add the relevent JavaScript code to the head and the input field has an id of custom_tags but I get the following JS error:
Timestamp: 07/05/2013 13:06:18
Error: TypeError: Joomla.JText._ is not a function
Source File: /media/jui/js/ajax-chosen.min.js
Line: 5
Ideally the field would simply save the tags as a comma seperated string within the 3rd party component but I am also happy to save the tags in the internal database instead if that is easier.
Is this possible to do with the new tags API? Any help or pointer would be great appreciated.
Many thanks,
Joe