mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 15:05:42 +00:00
parent
5d3d3e1b00
commit
416a5b8864
@ -34,14 +34,14 @@ class UserFormsGridFieldFilterHeader extends GridFieldFilterHeader {
|
||||
|
||||
// retrieve a list of all the available form fields that have been
|
||||
// submitted in this form.
|
||||
$params = $gridField->getForm()->getController()->getURLParams();
|
||||
|
||||
$formFields = SubmittedFormField::get()
|
||||
->filter(array(
|
||||
"SubmittedForm.ParentID" => $gridField->getList()->column()
|
||||
))
|
||||
->where(sprintf("SubmittedForm.ParentID = '%s'", Convert::raw2sql($params['ID'])))
|
||||
->leftJoin('SubmittedForm', 'SubmittedFormField.ParentID = SubmittedForm.ID')
|
||||
->sort('Title', 'ASC')
|
||||
->map('Name', 'Title');
|
||||
|
||||
|
||||
// show dropdown of all the fields available from the submitted form fields
|
||||
// that have been saved. Takes the titles from the currently live form.
|
||||
$columnField = new DropdownField(
|
||||
|
@ -118,9 +118,7 @@ class UserDefinedForm extends Page {
|
||||
|
||||
// attach every column to the print view from
|
||||
$columns = SubmittedFormField::get()
|
||||
->filter(array(
|
||||
"SubmittedForm.ParentID" => $this->ID
|
||||
))
|
||||
->where("SubmittedForm.ParentID = '$this->ID'")
|
||||
->leftJoin('SubmittedForm', 'SubmittedFormField.ParentID = SubmittedForm.ID')
|
||||
->map('Name', 'Title');
|
||||
|
||||
|
@ -9,6 +9,6 @@
|
||||
"email": "will@fullscreen.io"
|
||||
}],
|
||||
"require": {
|
||||
"silverstripe/framework": ">=3.1.*@dev"
|
||||
"silverstripe/framework": "3.*"
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user