DaDaBikv9 "multiple inserts" and "insert as new"

dmajwool

Member
I found the below in the version 9 changelog, but in my application I am prohibiting Creation of new records. (The records are created by another app & I'm using DaDaBik to add details and make exports).

So I don't require either of these buttons in my application and I'd prefer users not to see them.

Could we make it either so that these buttons are visible conditional on the Create permission, or so that there are config parameters for both of them.

Many thanks, David.

Record copy
A new "copy record" feature is available: when you enter a record in edit mode, you can click on 'insert as new' to insert the current record as a new record instead of saving it. Furthemore, you can check the 'multiple inserts' checkbox to get again, after an insert operation, the edit form that allows you to insert another record starting from the values of the one previously inserted. A new configuration parameter, $show_multiple_inserts_checkbox, allows to display/hide the checkbox (by default, the checkbox is displayed). Please note that 'insert as new' doesn't work for generic_file / image_file fields and that, if the record is a master of a master/deails view, the details records are not 'copied'.
 

eugenio

Administrator
Staff member
Hello,
you can remove the multiple inserts checkbox by setting the parameter $show_multiple_inserts_checkbox in config.php.

The "insert as new" button, however, shows up even if the user doesn't have insert permissions (the insert operation, however, won't be processed). It's definitely a bit confusing so we are going to change this in the next release.

Best,
 

taubes

Member
Hi I am trying to remove the "insert as new" button but this still does shows in the edit form. I can remove other buttons like top buttons but "insert as new" is still there despite setting $show_multiple_inserts_checkbox = 0; Any ideas?

DaDaBIK version 11.10-Elba platinum
PHP Version: 7.4.30
mysql version: 5.5.5-10.3.32-MariaDB
Web server: Apache/2.4.54 (Unix)
 

eugenio

Administrator
Staff member
Hi,
at the moment it is not possible to remove that button using config parameters. You could remove from /views/form.php the related code (search "insert_as_new", it appears twice) but I don't recommend this because your changes would be overwritten when you upgrade.
$show_multiple_inserts_checkbox is in some way related but it's a different feature.

Best,
 
Top