Hello,
I have created a widget, in which I want to bind a PageID/SiteTreeID to the widget to load data. In order to select the page ID my first solution was to use the TreeDropdownField(). I have the following code to generate my admin for the widget:
public function getCMSFields() {
return new FieldList(
new TextField("WidgetTitle", "WidgetTitel"),
new TreeDropdownField("PageID", "Kies pagina voor submenu", "SiteTree")
);
}
However when I use this, I get the following error:
Fatal error: Call to a member function FormAction() on a non-object in C:\xampp\htdocs\4happyfeet.nl\framework\forms\FormField.php on line 139
Do I need some additional things in my Widget in order to make this work, like dependencies in Javascript and such?
Any ideas regarding this would be appreciated.
Regards,
Jan Jaap