hi
how to use wordwrap in DropdownField in CMS ?
return new FieldSet(
new DropdownField('File_name','Select image:',DataObject::get("File")->toDropdownMap('Filename',wordwrap('Filename', 50, "\n", 1)))
)
what is wrong ?
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
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.
hi
how to use wordwrap in DropdownField in CMS ?
return new FieldSet(
new DropdownField('File_name','Select image:',DataObject::get("File")->toDropdownMap('Filename',wordwrap('Filename', 50, "\n", 1)))
)
what is wrong ?
Are you trying to wrap the Filename of each file in the in the drop down?
You can't. Select fields will always be rendered by browsers on a single line. That's an HTML limitation, not a silverstripe one.