From b0bda93d1df8d0bcd8f8719e82187b5d20137814 Mon Sep 17 00:00:00 2001 From: Tom Densham Date: Tue, 7 May 2013 16:19:17 +0200 Subject: [PATCH] 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. Let me know if this is submitted to the right branch. --- code/GridFieldBulkImageUpload_Request.php | 1 + 1 file changed, 1 insertion(+) diff --git a/code/GridFieldBulkImageUpload_Request.php b/code/GridFieldBulkImageUpload_Request.php index e1722ce..1faa4df 100644 --- a/code/GridFieldBulkImageUpload_Request.php +++ b/code/GridFieldBulkImageUpload_Request.php @@ -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);