Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiselectfield inside widget CMSField #3

Open
blpraveen opened this issue Oct 27, 2014 · 0 comments
Open

multiselectfield inside widget CMSField #3

blpraveen opened this issue Oct 27, 2014 · 0 comments

Comments

@blpraveen
Copy link
Contributor

I found two issues when I used inside widget CMSFields
1)trying to getRecord on a no object $this->form->getRecord() in 97
2)Second it is showing tabs inside the widget
multiselect

In the Widgets

function getCMSFields() {
    $fields = parent::getCMSFields(); 
    $fields->merge( 
        new FieldList(
            new MultiSelectField(
                "ShowPages",
                "",
                ShowPage::get()->map('ID','Title')->toArray()
            )
        )
    );

    $this->extend('updateCMSFields', $fields);

    return $fields;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant