Hi,
can someone tell me how to make an upcoming function?
i created a data object with event entries. i want that only the event which is the next is displayed.
that's my eventobject.php
<?php
class EventObject extends DataObject {
public static $db = array(
'NextEvent' => 'Boolean',
'EventName' => 'Text',
'EventDate' => 'Date',
'EventTime' => 'Text',
'EventDescription' => 'HTMLText',
);
public static $has_one = array(
'EventFlyer' => 'Image',
'EventPage' => 'EventPage'
);
static $default_sort = "Created DESC";
function getCMSFields_forPopup() {
$fields = new FieldSet();
$fields->push(new CheckBoxField('NextEvent', 'findet das Event als nächstes Statt?(IMMER NUR BEI EINEM EVENT AUSWÄHLEN!!!)'));
$fields->push(new TextField('EventName', 'Was findet statt?'));
$fields->push($Date = new DateField('EventDate', 'An welchem Datum findet es statt?'));
$Date->setConfig('showcalendar', true);
$fields->push(new TextField('EventTime', 'Zu welcher Uhrzeit findet es statt?'));
$fields->push(new SimpleTINYMCEField('EventDescription', 'Genauere Infos, Auftritte, Preise, etc. zum Event'));
$fields->push($EventFlyer = new ImageUploadField('EventFlyer', 'Der Flyer des Events'));
$EventFlyer->setUploadFolder('event');
return $fields;
}
}
?>
i really hope someone could help me.
Regards
Benni