Jump to:

2011 Posts in 1436 Topics by 620 members

Form Questions

SilverStripe Forums » Form Questions » Overriding Login Template and Class

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

Page: 1
Go to End
Author Topic: 2040 Views
  • biapar
    Forum Moderator
    435 Posts

    Overriding Login Template and Class Link to this post


    I've to create a new template for login page, but I don't understand how made it. I create a new class MyMemberLoginForm that extend MemberLoginForm and MyMemberLoginForm.ss, but don't works.

    Into class; Iwrite only declaration, because I don't add any new fields or overriding function.

    class MyMemberLoginForm extends MemberLoginForm {


    Then Into config file , I add Object::useCustomClass('MemberLoginForm', 'MyMemberLoginForm ');

    How are the right steps?

    Thank you

  • zenmonkey
    Community Member
    528 Posts

    Re: Overriding Login Template and Class Link to this post

    I think you need to declare the new template in MyMemberLoginForm

    function forTemplate() {
    return $this->renderWith(array(

    And then make a template

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.