3060 Posts in 864 Topics by 646 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 182 Views |
-
Listing dataobjects with ListboxField

4 September 2012 at 7:28pm
Hey,
I have a many to many relationship between a DataObject (Tag) and a Page and am wanting to manage the relationship through a multiple select.
At the moment I am stuck with the following code
$tagsField = new ListboxField(
'Tags',
'Tags',
Tag::get()->toArray("ID", "Name"),
$this->Tags()->toArray("ID", "Name"),
null,
true
);Error: Object->__call(): the method 'fortemplate' does not exist on 'Tag'
I know this code won't currently allow me to add new tags but I would like to get my head around how to link existing tags with a page.
Hopefully I am not too far off.
Cheers.
| 182 Views | ||
|
Page:
1
|
Go to Top |

