Source of file FormPage.php
Size: 0,665 Bytes - Last Modified: 2018-10-05T10:22:12+00:00
/var/www/docs.ssmods.com/process/src/src/FormPage/FormPage.php
123456789101112131415161718192021222324252627 | <?php namespace IQnection\ConstantContact\FormPage; use SilverStripe\ORM\DataExtension; use SilverStripe\Forms; class FormPage extends DataExtension { private static $db = [ 'ConstantContactListID' => 'Int' ]; public function updateCMSFields(Forms\FieldList $fields) { $CC = new \IQnection\ConstantContact\ConstantContact(); $lists = $CC->getLists(); $listOptions = []; foreach($lists as $list) { $listOptions[$list->id] = $list->name; } $fields->addFieldToTab('Root.ConstantContact', Forms\DropdownField::create('ConstantContactListID','Add Submissions to List:') ->setSource($listOptions) ->setEmptyString('-- Select --') ); } } |