3093 Posts in 875 Topics by 654 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1098 Views |
-
Adding Fields to Member Object

25 August 2009 at 12:45am
I'm having trouble adding fields to the Member Object
Here is my PHP
class ClientMember extends DataObjectDecorator {
function extraDBFields() {
return array(
'db' => array(
"ApprovedMember" => "Boolean",
"CompanyName" => "Text",
"TaxIDNumber" => "Text",
"Distributor" => "Text",
"SalesRep" => "Text",
"SiteAccess" => "Enum('1', '2', '3', '4', '5')",
"Description" => "Text"
),
);
}public function updateCMSFields(FieldSet &$fields) {
$fields->push(new TextField('ApprovedMember', 'Verified Contact'));
$fields->push(new TextField('CompanyName', 'Company Name'));
$fields->push(new TextField('TaxIDNumber', 'Tax ID Number'));
$fields->push(new TextField('Distributor', 'Distributor'));
$fields->push(new TextField('SalesRep', 'Sales Rep'));
$fields->push(new TextAreaField('Description', 'Description'));
$fields->push(new TextAreaField('SiteAccess', 'Site Access Request'));
}
}Once I add the following line to my _config.php I get a blank page when visiting the site or rebuilding the db
Object::add_extension('Member', 'ClientMember');
Debug doesn't give me an more info.
I want to eventually be able to check login against Approved Member (
-
Re: Adding Fields to Member Object

26 August 2009 at 9:58am
Change
Object::add_extension('Member', 'ClientMember');
to
DataObject::add_extension('Member', 'ClientMember');
Should do the trick ;)
-
Re: Adding Fields to Member Object

27 August 2009 at 8:44am
I must have something else wrong because that didn't do. I think I've come up with a different way to handle it anyway
| 1098 Views | ||
|
Page:
1
|
Go to Top |


