Jump to:

5520 Posts in 1734 Topics by 1223 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: 1419 Views
  • snaip
    Avatar
    Community Member
    180 Posts

    wordwrap text in Dropdownfield Link to this post

    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 ?

  • Hamish
    Avatar
    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.

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