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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

All other Modules /

Discuss all other Modules here.

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

User Defined Forms, possible bug?

Go to End

7 Posts   2936 Views


Community Member, 109 Posts

5 August 2009 at 12:06am


Am using User Defined Forms module 0.2.0, over SilverStripe build 2.3.3.

I set up a form with a couple of selectboxes and some checkboxes. No problem. The form submits fine and the submitted entries turn up on the Submissions tab.

However, when trying to set up an email recipient on the Email Recipients tab, as soon as I hit Add, I get the following error:

Fatal error: Call to a member function toDropdownMap() on a non-object in D:\wamp\www\SilverStripe\userforms\code\UserDefinedForm.php on line 605

Anyone know what this is?


Community Member, 109 Posts

6 August 2009 at 7:52pm


...did I post this to the wrong part of the forum? 28 views and no replies yet. :-)

I've found references to the same error, ie. "Call to a member function toDropdownMap() on a non-object..." elsewhere in the forums, but never in connection with UserDefinedForm.php - it's always some other module or one of the core modules.

I'm still searching for a solution, and am wondering if I should just re-install the module, but all advice still much appreciated.



Forum Moderator, 5523 Posts

6 August 2009 at 8:28pm

Quick fix Open up UserDefinedForm.php and find this on line 605

$multiOptionFields = $multiOptionFields->toDropdownMap('ID', 'Title');
$fields->insertAfter(new DropdownField('SendEmailToFieldID....

and just add a if round it

if(is_object($multiOptionFields)) {
$multiOptionFields = $multiOptionFields->toDropdownMap('ID', 'Title');
$fields->insertAfter(new DropdownField('SendEmailToFieldID....

Will get a patch into the module asap.


Community Member, 109 Posts

6 August 2009 at 9:57pm

Thanks willr, much appreciated.


Community Member, 13 Posts

15 September 2009 at 9:59pm

I had the same problem.. Thx.


Community Member, 31 Posts

18 November 2009 at 1:58am

Thanks! Had the same problem, this fixed it right up :)


Community Member, 8 Posts

21 January 2010 at 9:01am

Thanks a million.