How to make Dataset CSV import auto check Overwrite & Ignore


I thought I would post this to help others out. When I import csv data in to a Dataset, I always Overwrite current data and Ignore header row. I wanted those to be the default options.

so around Line 1118 and 1123 in lib\pages\dataset.class.php, change Null to 1

$formFields[] = FormManager::AddCheckbox('overwrite', __('Overwrite existing data?'), 
__('Erase all content in this DataSet and overwrite it with the new content in this import.'),