Jump to:

23481 Posts in 18965 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Field from has_one relation in CMS admin area

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 349 Views
  • Futureweb
    Avatar
    Community Member
    232 Posts

    Field from has_one relation in CMS admin area Link to this post

    Hi,

    I have a shop, with orders. each order has a 'has_one' relation to a member, each member has notes.

    In the admin, I'm trying to add a field to the 'order' page which lets the client view/edit the notes.

    this works in displaying the notes on the page:
    $fields->addFieldToTab("Root.Notes", new LiteralField("summary", $this->Member()->Notes, ''));

    however, trying to an html field to view/edit the notes doesn't work
    $fields->addFieldToTab("Root.Notes", new HTMLEditorField($this->Member()->Notes, 'Notes'));
       

    Does anyone know a way of making this work?

    Cheers

    349 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.