21487 Posts in 5783 Topics by 2621 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 224 Views |
-
Searchable_Fields pulldown Model Admin

18 November 2011 at 5:08am
I currently have a DataObject "enhancements"
For searchable fields I have:
static $searchable_fields = array(
'Requester' => 'Requester',
'Title' => 'Title',I want to create a pulldown for a Status field that has options of Active, Pending, Completed inside my search area ModelAdmin. I can get to work as a text field, but not a pulldown
I've searched the forums and all I can find is that ModelAdmin will create pulldowns automatically in the search area for fields from related objects like:
static $searchable_fields = array(
'ArticleTypeID' =>array( 'title' => 'Article Type' )
);I've also stumbled onto this example:
static $searchable_fields = array(
"Organisation.ZipCode" => array(
"field" => "TextField",
"filter" => "PartialMatchFilter",
"title" => 'Organisation ZIP'
)
);If I modifiy it to fit my example... changing Organisation.ZipCode to Status and TextField to Pulldown, I do get a pulldown, but it's blank.
Any help would be appreciated.
Brian
-
Re: Searchable_Fields pulldown Model Admin

21 November 2011 at 11:19pm
as a last resort you can always manipulate the fields as you want with...
public function scaffoldSearchFields() {
$fields = parent::scaffoldSearchFields();
//do stuff with $fieldsreturn $fields;
}
| 224 Views | ||
|
Page:
1
|
Go to Top |


