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.

All other Modules

Discuss all other Modules here.

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

User Defined Forms, possible bug?


7 Posts   2612 Views


5 August 2009 at 12:06am Community Member, 104 Posts


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?


6 August 2009 at 7:52pm Community Member, 104 Posts


...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.



6 August 2009 at 8:28pm Forum Moderator, 5511 Posts

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.


6 August 2009 at 9:57pm Community Member, 104 Posts

Thanks willr, much appreciated.


15 September 2009 at 9:59pm Community Member, 13 Posts

I had the same problem.. Thx.


18 November 2009 at 1:58am Community Member, 31 Posts

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


21 January 2010 at 9:01am Community Member, 8 Posts

Thanks a million.