10448 Posts in 2223 Topics by 1719 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1014 Views |
-
[SOLVED] Multiform stuck on step one.

5 November 2009 at 9:50am
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 tofunction 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 |

