Following challenge:
When creating an new Page, the data should be checked by the data of an external Database.
Example:
Silverstripe:
public static $db = array(
'EventDate' => 'Date',
'EventName' => 'Text',
'EventID' => 'Int',
);
$fields->addFieldToTab("Root.Content.Main", new TextField('EventDate','Date:'));
$fields->addFieldToTab("Root.Content.Main", new TextField('EventName','Text:'));
External Database:
'eventDate' => 'Date',
'eventName' => 'Text',
'eventID' => 'Int',
Bevore storing the data in SilverStripe I have to check, if SilverStripe.EventDate corresponds with an entry in external.eventDate and SilverStripe.EventName corresponds with an entry in external.eventName. If not, store the data in the external database and store the external.eventID in SilverStripe.EventID.
Has anyone any idea?
Cheers
geist