Jump to:

5540 Posts in 1738 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » wordwrap text in Dropdownfield

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

Page: 1
Go to End
Author Topic: 1428 Views
  • snaip
    Community Member
    180 Posts

    wordwrap text in Dropdownfield Link to this post


    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 ?

  • Hamish
    Community Member
    712 Posts

    Re: wordwrap text in Dropdownfield Link to this post

    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.

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.