Thanks for taking the time out to reply.
I'm familiar with literal field. However, are you aware of the member profiles module and how it works? If only it were that easy...
Here's where I am so far. I have installed the member profiles module, created a MemberDecorator as a Dataobject decorator.
In the decorator, I have added some custom stats like so:
function extraStatics() {
return array (
'db' => array(
'Role' => 'Varchar(255)',
'Organization' => 'Varchar(255)',
'Secondary Email' => 'Varchar(255)',
'PhoneNumber' => 'Varchar(255)',
'HomePhone' => 'Varchar(255)',
'FaxNumber' => 'Varchar(255)',
'Mobile' => 'Varchar(255)',
'PreferredContactMethod' => "Enum('Email,Fax,txt','Email')",
'PreferredEmergencyContactMethod' => "Enum('Email,Fax,txt','Email')",
'WorkAddress' => 'Varchar(255)',
'City' => 'Varchar(255)',
'PostalCode' => 'Varchar(255)',
'Status' => "Enum('txt','txt')",
'HeadingAdressSection' => 'Varchar(255)'
),
'defaults' => array(
'Status' => 'Disabled'
)
//,'has_many' => array( 'Subscription' => 'Subscription' )
);
}
If you see, the last database entry is "HeadingAddressSection" so what I need to do is have member profiles recognise this as a literal field, so I have set the following:
public function updateMemberFormFields(&$fields) {
$fields->removeByName('HeadingAdressSection');
$fields->push( new LiteralField('HeadingAdressSection', '<h3>Please give us your adress</h3>'));
}
Attempting to remove the field which member profile creates, and adding my new literal field.
This, however doesn't work. It stops that field from being added to the member profile list of fields entirely.
Does this make sense now?
If anyone can provide help, I'd really appreciate it.