mirror of
https://github.com/colymba/GridFieldBulkEditingTools.git
synced 2024-10-22 11:05:57 +02:00
Use populateCMSDataFields to return default DataObject values
I have edited the getRecordHTMLFormFields method to run populateCMSDataFields so that default values set in your DataObject get pulled through.
This commit is contained in:
parent
8dff91972a
commit
0efd842a8b
@ -166,6 +166,7 @@ class GridFieldBulkImageUpload_Request extends RequestHandler {
|
||||
if ( $config['imageFieldName'] == null ) $config['imageFieldName'] = $this->getDefaultRecordImageField();
|
||||
|
||||
$recordCMSDataFields = GridFieldBulkEditingHelper::getModelFilteredDataFields($config, $recordCMSDataFields);
|
||||
$recordCMSDataFields = GridFieldBulkEditingHelper::populateCMSDataFields($recordCMSDataFields, $this->gridField->list->dataClass, $recordID);
|
||||
$formFieldsHTML = GridFieldBulkEditingHelper::dataFieldsToHTML($recordCMSDataFields);
|
||||
$formFieldsHTML = GridFieldBulkEditingHelper::escapeFormFieldsHTML($formFieldsHTML, $recordID);
|
||||
|
||||
@ -430,4 +431,4 @@ class GridFieldBulkImageUpload_Request extends RequestHandler {
|
||||
)));
|
||||
return $items;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user