MIGX importcsvmigxdb: don't allow editors to empty table

Hey there,
i would like to implement the importcsvmigxdb feature for my editors without them being able to activate the option highlighted (empty table).

In fact, i only want them to be able to import new entries, that’s it. So i assume i would only have to tick the green highlighted checkbox?

Is there a way to preselect the checkbox needed and to hide the others?

I don’t know if you can change the import window (without losing the changes on the next upgrade of MIGX).

But you can create a custom processor:

Copy the file core/components/migx/processors/mgr/default/importcsv.php to the folder of your own package core/components/your_package_name/processors/mgr/default.

The processor from your own package now takes precedence.

Then change the processor code:
For example, set the variables in these lines

to hard-coded values.

1 Like

This is possible by creating a file in core/components/{your_package_name}/import with the name {your_class_name}.settings.js. ({your_class_name} is the “Classname” setting from the tab “MIGXdb-Settings”).

The content of the file should be JSON. Something like this:

    "settings": ["insert_missing_only"]
1 Like

Thanks @halftrainedharry that seems to work.
The modal window actually has an id. So i did a combination of preselecting the checkboxes and hiding what i don’t want my editors to see via custom CSS.