Jump to:

7935 Posts in 1536 Topics by 943 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » How i call from the classID, $variablename?

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1
Go to End
Author Topic: 411 Views
  • Dr0gaz
    Community Member
    37 Posts

    How i call from the classID, $variablename? Link to this post

    $f ->addFieldToTab(
       new DropdownField(

    Sample i want show the variable $Nomecat this class Marca

  • UncleCheese
    4085 Posts

    Re: How i call from the classID, $variablename? Link to this post

    I'm having a hard time understanding what you want, but it might help you to know that toDropdownMap() takes two arguments.

    ->toDropdownMap($value, $text);

    they default to "ID" and "Title".

    Maybe you want ->toDropdownMap('ID','Nomecat') ??

    Just guessing.

    SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

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.