I have created a new module near to Site Content, that is Advertisement. In this module i have created some fields for adding the advertisement. Here is the code
$fields = new FieldSet(
new TabSet( 'Root',
new Tab(_t('AdvertisementAdmin.ADVTDETAILS', 'Advertisement Details xXx'),
new HiddenField('ID','id #',$id),
new DropdownField('Advertiser', _t('AdvertisementAdmin.ADVERTISER','Advertiser * xXx'), $advertisermap),
new TextField('AdTitle', _t('AdvertisementAdmin.ADTITLE','Ad Title xXx'), _t('AdvertisementAdmin.NEWADVERTISEMENT','New Advertisement xXx')),
new TextareaField('Html', _t('AdvertisementAdmin.HTMLTEXT','Html/Text xXx'), 8, "", ""),
new CheckboxField('Active', _t('AdvertisementAdmin.ACTIVE','Active xXx'), "1"),
new TreeMultiselectField('Pages','Pages in Menu','SiteTree')
So in the above code you can see that i am trying to include a TreeMultiselectField at the last. here i want to load the Site Tree Structure for multiple select. and i want to insert the selected ids in to the same table as ids are comma separated or in any other table with the advertisement id and the page id.
But in the TreeMultiselectField, it will show up the Site Tree content that i have created.
So what i need is, i have to show a TreeMultiselectField in the form and i need to multiple check the pages and insert in to the same table where advertisements add or in any other table for storing Added advertisement id along with the selected page ids.
Could any one help me for this... if so it would be very helpful to me.... any help is much appreciated.
Thanks and Regards,