Jump to:

1971 Posts in 1275 Topics by 607 members

Form Questions

SilverStripe Forums » Form Questions » Textareafield default value

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

Page: 1
Go to End
Author Topic: 328 Views
  • cwchong
    Avatar
    Community Member
    13 Posts

    Textareafield default value Link to this post

    Hi, as i understand from the docs,

    new TextareaField(
    $name = "description",
    $title = "Description",
    $rows = 8,
    $cols = 3,
    $value = "This is the default description"
    );

    However, when i tried to add a new textfield to a page:
    function getCMSFields() {
    ...
    $fields->addFieldToTab("Root.Content", new TextareaField('test', 'test', 5, 10, 'default value'));
    ...
    }

    The textarea comes up with a blank content value.
    The same "bug" occurs when using derivatives of TextareaField

    Can anyone do a quick test on the latest 2.4.6 and check if this happens for you too?

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