Jump to:

23374 Posts in 18175 Topics by 2866 members

General Questions

SilverStripe Forums » General Questions » Adding spaces or other notes to the Fields...

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: 798 Views
  • steve_nyhof
    Avatar
    Community Member
    224 Posts

    Adding spaces or other notes to the Fields... Link to this post

    Does anyone know how to add a space or field to add a note to the Field functions?

    The first field creates a title which is nice, but I would like to add a space above it.

    $fields->addFieldToTab('Root.Content.BannersAndPopups', new HeaderField($title = 'Sticky Note',$headingLevel = 3));

    The other is to add a note to the page, when ever I add an echo = "something" it adds the space to the very top of the editor.

    Thank you,
    Steve

  • martimiz
    Avatar
    Forum Moderator
    1067 Posts

    Re: Adding spaces or other notes to the Fields... Link to this post

    Hi Steve,

    I'm not quite sure what you mean by 'adding a note' - but maybe this'll be of some help: apart from the HeaderField, there's also a LiteralField that lets you add HTML tot the form.

  • steve_nyhof
    Avatar
    Community Member
    224 Posts

    Re: Adding spaces or other notes to the Fields... Link to this post

    That did it, thank you...

    This adds a space by using the <p>&nbsp;</p> tags

    $fields->addFieldToTab('Root.Content.BannersAndPopups', new LiteralField('','<p>&nbsp;</p>'));

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