Quantcast
Channel:
Viewing all articles
Browse latest Browse all 4235

Add form field datetime with many_many table

$
0
0

Hi team,
i have the following dataobjects

class Video extends DataObject {

private static $belongs_many_many = array(
'Channels' => 'Channel',
);

);

class Channel extends DataObject {

private static $db = array(
'ChannelTitle' => 'Varchar(255)',
'ChannelDescription' => 'Text'
);
private static $many_many = array(
'Videos' => 'Video'
);
private static $summary_fields = array(
'ChannelTitle'
);
private static $many_many_extraFields = array(
'Videos' => array(
'PublishedDate' => 'SS_Datetime',
'UnpublishedDate' => 'SS_Datetime'
)
);

}
The relation between video and channel is many_many
now i have to add a form to submit the publishedDate and unpublisheddate for the specific channels. what is the datefields and variable suitable name for its like i have Channel: youtube, smarttv, tablets.. and add 2 above fields to set to each channel for a video. Thanks


Posted to: Add form field datetime with many_many table | Show Thread | Post Reply


Viewing all articles
Browse latest Browse all 4235

Trending Articles