Skip to content

multiselectfield inside widget CMSField #3

Open
@blpraveen

Description

@blpraveen

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions