Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba

TagField module not autosuggesting


Go to End
Reply


5 Posts   1039 Views

Avatar
KINKCreative

Community Member, 59 Posts

5 August 2011 at 8:08am

Hi guys, I've downloaded the latest TagField module code and did a dev/build. Added the Tag class

<Tag.php>

class Tag extends DataObject {
		static $db = array(
			'Title' => 'Varchar(200)',
		);

		static $belongs_many_many = array(
			'Articles' => 'Article'
	);
}

and incorporated the relation into my Article class...

<Article.php>

...

static $many_many = array(
		'RelationTags' => 'Tag'
	);

...

$tagField = new TagField('RelationTags');

The field is the added accordingly to the fieldset. The Articles are managed via a DOM in a Category class, as follows:

<Category.php>

public function getCMSFields()
	{
		$f = parent::getCMSFields();
		$articleManager = new DataObjectManager(
			$this, // Controller
			'Articles', // Source name
			'Article', // Source class
			array(
				'isPublished' => 'Published',
				'isFeatured' => 'Featured',
				'Title' => 'Title',
				'AuthorName' => 'Author',
				'Created' => 'Created',
				'LastEdited' => 'LastEdited',
			), // Headings 
			'getCMSFields',  // Detail fields (function name or FieldSet object)
			 '', 			// Filter clause
			 '' 			// Sort clause
			// Join clause
		);

The field does appear in the popup, saves the info, but there is no interactivity on the field. Am I missing something? Feels like the javascripts/jqueries etc are not even loading.

Thanks!

Attached Files
Avatar
mayko

Community Member, 3 Posts

27 April 2012 at 10:38am

Same problem here. Any suggestions?

Avatar
Pipifix

Community Member, 56 Posts

12 July 2012 at 9:29pm

Me too. Are there some helpful explanations?

Avatar
alvonso

Community Member, 6 Posts

11 August 2012 at 7:08pm

For me the newest TagField module from github worked.
https://github.com/chillu/silverstripe-tagfield/

Avatar
alvonso

Community Member, 6 Posts

11 August 2012 at 7:08pm

For me the newest TagField module from github worked.
https://github.com/chillu/silverstripe-tagfield/