Jump to:

23461 Posts in 18908 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » TextareaField add attribute "wrap"

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: 1200 Views
  • swaiba
    Avatar
    Forum Moderator
    1788 Posts

    TextareaField add attribute "wrap" Link to this post

    I'm looking at adding an attribute (wrap) to a TextareaField - I've yet to find an $field->AddAttribute(name,val) - can anyone help with this please?

  • martimiz
    Avatar
    Forum Moderator
    1078 Posts

    Re: TextareaField add attribute "wrap" Link to this post

    As far as I see it's not there All attributes seem to be hardcoded into the FormField::Fields() method, that calls the FormField::createTag() that in turn only creates attributes it receives in its param list. I've tried following the chain of methods involved in creating a field, and it won't be simple to wriggle in some general AddAttributes() thing - definitely not without changing core...

    So probably it's extending the TextareaField - unless I'm totally missing something...

  • swaiba
    Avatar
    Forum Moderator
    1788 Posts

    Re: TextareaField add attribute "wrap" Link to this post

    shame - that seems a bit basic to add something like that

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