Page 1 of 1

Hide the "Add New" button

Posted: 2022-03-31 22:03
by rpierce
Is there a way to hide the Add New button on a certain table?

Re: Hide the "Add New" button

Posted: 2022-03-31 23:46
by peebee
Have you tried unchecking the "Insert" privilege button for the particular table on the Group permissions in the Admin area?

Result = no "Add New" button for that Group on that table.

Re: Hide the "Add New" button

Posted: 2022-04-01 15:04
by rpierce
I want users to be able to add new records to the table, but only while in DV-TV of the parent record. If they are in table view of the target table I want the "Add New" button hidden or disabled.

Re: Hide the "Add New" button

Posted: 2022-04-20 20:31
by xbox2007
to hide Add New in detail view
use this code on tablename-dv.js

Code: Select all

$j('#addNew').hide();
in table view
use this code in tablename-tv.js

Code: Select all

$j('#addNew').hide();

Re: Hide the "Add New" button

Posted: 2022-04-28 03:21
by rpierce
This code is working for DV but not TV.

Re: Hide the "Add New" button

Posted: 2022-05-04 02:26
by zibrahim
I use setInterval function for TV. The AddNew button will eventually appear momentarily and then disappear.

Code: Select all

// hide the AddNew button after set interval value
$j(function () {
    setInterval(function () {
        $j('#addNew').hide();
    }, 100);
});
If anyone have better solution, please share.

Thanks.