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?
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
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...
shame - that seems a bit basic to add something like that :(