Hi
I am new to SS... and I am developing a small application where I have this couple of objects:
class SBJob extends DataObject {
static $singular_name = 'Job';
static $plural_name = 'Jobs';
static $db = array(
'Title' => 'Text',
'Description' => 'Text',
'Location' => 'Text',
'ExpiryDate' => 'Date',
);
static $has_one = array('JobCategory' => 'SBJobCategory', 'JobType' => 'SBJobType');
static $searchable_fields = array('Title', 'Description', 'Location', 'JobType.Title', 'JobCategory.Title');
...
}
where SBJobCategory, SBJobType are also extending DataObjects and I can define them in the backend.
What I'm trying to build is a search form that has these fields to search by:
Title - textField
Description - textField
Location - textField
JobCategory - DropDown, prefilled with the values already defined in the backend
JobType - DropDown, prefilled with the values already defined in the backend
I have the textfields on the page, but I am stuck woth dropdowns...
can u point me to some exmples or docs to read about this?
thank you.