You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, if i use a has_many relation, than there will always be the editable "SortOrder" field on create a new item or on editing an existing. How can i get rid of it?
// optionale Zuordnung von Zusatzinformationen (Accordeon) je Seite
$zusatzinfosFieldConfig = GridFieldConfig::create()->addComponents(
new GridFieldToolbarHeader(),
new GridFieldAddNewButton('toolbar-header-right'),
new GridFieldSortableHeader(),
new GridFieldDataColumns(),
new GridFieldPaginator(10),
new GridFieldEditButton(),
new GridFieldDeleteAction(),
new GridFieldDetailForm(),
new GridFieldDeleteAction('unlinkrelation'),
new GridFieldSortableRows('SortOrder')
);
$ZusatzinfosField = new GridField("Zusatzinfos", "Zusatzinfos:", $this->Zusatzinfos()->sort('SortOrder'), $zusatzinfosFieldConfig);
$fields->addFieldToTab('Root.Zusatzinfos', $ZusatzinfosField);
Carsten,
You need to override getCMSFields on your data object and remove the field or define your own list of fields. I'm guessing that you do not have a getCMSFields on that object. If your not sure how to do this check the SilverStripe docs or I can post a quick snippet later today.
Second thought (now that i can actually read the snippets you posted, stupid GitHub Issues app on ios). Try renaming your getCMSFields_forPopup() to getCMSFields(), that should fix things ;). SilverStripe 3.0 does not use getCMSFields_forPopup.
Hi, if i use a has_many relation, than there will always be the editable "SortOrder" field on create a new item or on editing an existing. How can i get rid of it?
page.php
[...]
zusatzinfos.php
public function getCMSFields_forPopup() {
}
Thanks for your advice, Carsten.
The text was updated successfully, but these errors were encountered: