Jump to:

10845 Posts in 2513 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » User Defined Forms, possible bug?

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 2534 Views
  • Junglefish
    Avatar
    Community Member
    104 Posts

    User Defined Forms, possible bug? Link to this post

    Hi

    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?

  • Junglefish
    Avatar
    Community Member
    104 Posts

    Re: User Defined Forms, possible bug? Link to this post

    ^^Wondering...^^

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

    Thanks,

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: User Defined Forms, possible bug? Link to this post

    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.

  • Junglefish
    Avatar
    Community Member
    104 Posts

    Re: User Defined Forms, possible bug? Link to this post

    Thanks willr, much appreciated.

  • dany_doo
    Avatar
    Community Member
    13 Posts

    Re: User Defined Forms, possible bug? Link to this post

    I had the same problem.. Thx.

  • house98
    Avatar
    Community Member
    31 Posts

    Re: User Defined Forms, possible bug? Link to this post

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

  • Doverose
    Avatar
    Community Member
    8 Posts

    Re: User Defined Forms, possible bug? Link to this post

    Thanks a million.

    2534 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.