Hi,
I create behavior for custom tags for Article model, I take TaggableBehaviour extension as guidance
article _form
<?php echo $form->textField($model,'tags'); ?>
saving the tags works fine in to tables:
CREATE TABLE `tagged` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`tag_id` int(11) NOT NULL,
`entity_id` int(10) unsigned NOT NULL,
`entity_type` varchar(100) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `entity_id` (`entity_id`),
CONSTRAINT `fk_article` FOREIGN KEY (`entity_id`) REFERENCES `article` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=82 DEFAULT CHARSET=utf8;
CREATE TABLE `tags` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`tag` varchar(255) NOT NULL DEFAULT '',
`count` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `tag_UNIQUE` (`tag`)
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8;
My issue is the update, I do not know how to get the tags value in the article _form … how to do that ?
Thanks,