I am trying to add a form to userforms using the code below:
<?php
/**
* A dropdown field which allows the user to select a store
*
* @package userforms
*/
class EditableStoreDropdownField extends EditableFormField {
static $singular_name = 'Store Dropdown';
static $plural_name = 'Store Dropdowns';
public function getFormField() {
//$values = Dataobject::get("StorePage", "", "Store ASC");
return new DropdownField(
'Country',
'Country',
array(
'NZ' => 'New Zealand',
'US' => 'United States',
'GEM'=> 'Germany'
)
);
}
public function getIcon() {
return 'userforms/images/editabledropdown.png';
}
}
I've run /dev/build and flush, but whenever I visit a page that I've assigned the field to I get this error:
Please implement a getFormField() on your EditableFormClass.
Even though that method is any there.
Any help would be appreciated.