Jump to:

1016 Posts in 567 Topics by 309 members

Forum Module

SilverStripe Forums » Forum Module » custom getForumFields method

Discuss the Forum Module.

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

Page: 1
Go to End
Author Topic: 655 Views
  • wildflower1975
    Avatar
    Community Member
    59 Posts

    custom getForumFields method Link to this post

    I've followed the instructions in the wiki to create a separate getForumFields method in my own class 'Role' that extends the DataObjectDecorator and included the DataObject::add_extension('Member', 'CustomForumRole');

    statement in my config.php file but when i go to

    http://localhost/silverstripe/ForumMemberProfile/register

    the form always shows the fields stated in the getForumFields method from ForumMemberProfile.php

    I can alter the fields using updateForumFields in my CustomForumRole.php but I would like more control on the layout and order of the fields that update can give. (I want to add address details etc to the form)

    I don't want to be hacking at the Forum module code so i can upgrade it later without having to redo the Hacks.

    I'm not sure i can explicitly state a custom template to use either like I can with my own forms.

    thanks

    P.S

    actually insertBefore and insertAfter work quite well in the updateForumFields method thus:

    $fields->insertAfter($PostCode,'CityPublic');
    $fields->insertBefore($SuburbPublic,'CityPublic');   

    guess I'll have to style it with CSS in the end

    655 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.