Jump to:

10448 Posts in 2223 Topics by 1719 members

All other Modules

SilverStripe Forums » All other Modules » [SOLVED] Multiform stuck on step one.

Discuss all other Modules here.

Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1014 Views
  • Anonymous user
    Avatar
    Community Member
    1 Post

    [SOLVED] Multiform stuck on step one. Link to this post

    Just to let you know my frustration of yesterday. I'm working on some project. Everything is going well. Silverstripe and Multiform behave almost like I need it. Very little code. No change to the core apps.

    I was doing some re-factoring when everything stopped working. I was stuck on the first step. No validation error, no error trace in the PHP log. The textfield was emptied. The session was kept the same.

    I spend a lot of time troubleshooting. Late, late last night I found it. The multiform documentation shows the controller code. It name the form 'BCSMultiForm'

    function BCSMultiForm() {
    return new BCSMultiForm($this, 'BCSMultiForm');
    }

    Now by mistake I change the name of the form to something else. My problem started. Unable to go to step #2.

    It seems that for a reason that I don't understand the name of the form MUST be the same as the PHP function name.
    Unless somebody explain this a bit better, I change my code from the documented one to

    function BCSMultiForm() {
    return new BCSMultiForm($this, __FUNCTION__);
    }

    This look to work like a charm now. If anybody can explain to me what happen, I'll be very interested.

    Thanks.

    Hugues

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