Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Add Fields: Member Profiles Module SS3


Reply


4 Posts   454 Views

Avatar
Pix

Community Member, 147 Posts

18 January 2013 at 7:49am

Can anyone tell me how to do something as simple as adding some fields (like address, telephone) to the Member Profile Pages Module for SS3? I've found tons of tutorials that don't seem to work anymore since none of them apply to SS3 version of the module :0(

Thank you.

Avatar
Johnny9

Community Member, 21 Posts

9 September 2013 at 10:22am

Hi Pix, maybe you figured out how to add extra fields to member profile module? :)

Avatar
Till

Community Member, 2 Posts

24 September 2014 at 5:26am

I've also spent a couple of hours on trying to add custom fields and I don't want to learn all of SS from scratch. It would be so helpful to add a few lines to the instructions on the readme file to make it clear.
I would be extremely grateful if someone could answer these two questions:
1.) "hooking into

`Member::updateMemberFormFields`

to add the form field" - To which file in which directory do I add this?
2.)

```php
class MemberExtension extends DataExtension {

private static $db = array(
'PhoneNumber' => 'Text'
);

public function updateMemberFormFields(FieldList $fields) {
$fields->push(new TextField('PhoneNumber', 'Phone number'));
}
}

- Do I save this to a specific file name and to which directory?

Avatar
Till

Community Member, 2 Posts

26 September 2014 at 5:17pm

Solved it, but I'd wish that more SS instructions were written to be used without going into ever more details. SS is great, but other cms make it easier for the beginner to extend and change.