Jump to:

7938 Posts in 1541 Topics by 945 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » simple dropdown to query data

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: 363 Views
  • ZM
    Community Member
    4 Posts

    simple dropdown to query data Link to this post


    I created a dataobject like this:

    class StaffMember extends DataObject
    //db fields
    static $db = array (
    'Name' => 'Varchar(255)',
    'Role' => 'Varchar(100)',
    'Description' => 'Text'

    now like create a StaffPage.ss page which can use a dropdown field and filter/query only e.g. Roles like "Manager".
    In this dropdown field should all Roles available and only that chosen Members with the Role should be displayed.

    I know that is simple but I can't find a solution, so thank you for your help.


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.