21278 Posts in 5728 Topics by 2599 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 489 Views |
-
Something changed?

18 November 2009 at 12:36am
I have not touched this project for eternity and this thing worked in 2.3.0 but not in 2.3.3
<?php
class SeminarAll extends Page {
static $db = array(
);
}class SeminarAll_Controller extends Page_Controller {
function SeminarSearchFormAll(){
return new Form(
$this,
"SeminarSearchFormAll",
new FieldSet( new FormAction('doSeminarSearchAll','Display All Seminars'))
);
}function doSeminarSearchAll($data,$form){
$results = new DataObjectSet();
$resultss = DataObject::get("Seminar", "", "`seminardate`,`seminartimestart`");
$results->merge($resultss);
$results->sort('seminartimestart');
$results->sort('seminardate');
return $this->customise(array('SeminarSearchResults' => $results))->renderWith(array('SeminarSearch_results'));
}
}
?>It complains (in DevMode) about
function doSeminarSearchAll($data,$form){
but would not complain about
function doSeminarSearchAll(){(albeit the latter does not work)
Anything I am missing? Thank you in advance
Victor
-
Re: Something changed?

18 November 2009 at 2:56am
The form actions should be the fourth parameter of the Form constructor (not the third as in your example).
http://doc.silverstripe.org/doku.php?id=formfunction SeminarSearchFormAll(){
return new Form(
$this,
"SeminarSearchFormAll",
... your form fields? ...,
new FieldSet( new FormAction('doSeminarSearchAll','Display All Seminars'))
);
}
| 489 Views | ||
|
Page:
1
|
Go to Top |


