How To remove These Buttond
How To remove These Buttond
Marked in red are the buttons that I would like to remove. The button on the email field opens the email client on the user's pc, the other buttons are on the lookup field Payment schedule.
Any help with this is greatly appreciated !
TD
Any help with this is greatly appreciated !
TD
- Attachments
-
- remove buttons.png (6.82 KiB) Viewed 1248 times
Re: How To remove These Buttond
In AppGini, the cleanest way is to hide these with CSS, which you can do globally or per table/page, or per specific field:
That will hide those buttons for every lookup field throughout the application, but for a specific lookup only, such as the
If you want to remove these email launch buttons throughout the application without naming every email field:
If you only want this behavior on one AppGini table, you can also do it in that table's JavaScript hook rather than globally:
Code: Select all
/* =========================================
HIDE ALL LOOKUP ACTION BUTTONS GLOBALLY
========================================= */
/* "View parent" button beside lookup fields */
.view_parent {
display: none !important;
}
/* "Add new parent" button beside lookup fields */
.add_new_parent {
display: none !important;
}payment_schedule lookup, i.e. if you prefer to see View/Add buttons on other lookup fields:Code: Select all
/* Hide only Payment Schedule lookup buttons */
#payment_schedule_view_parent,
#payment_schedule_add_new {
display: none !important;
}Code: Select all
button[onclick*="mailto:"] {
display: none !important;
}Code: Select all
$j(function() {
// Hide lookup action buttons
$j('.view_parent, .add_new_parent').hide();
// Hide email launcher
$j('#email-link').hide(); // here email is the name of the field
});Re: How To remove These Buttond
In AppGini, the cleanest way is to hide these with CSS, which you can do globally or per table/page, or per specific field:
Code: Select all
/* =========================================
HIDE ALL LOOKUP ACTION BUTTONS GLOBALLY
========================================= */
/* "View parent" button beside lookup fields */
.view_parent {
display: none !important;
}
/* "Add new parent" button beside lookup fields */
.add_new_parent {
display: none !important;
}
Re: How To remove These Buttond
I added this code to the \hooks/__global.php
Now when I reload the app I get this error message
TD
Code: Select all
/* =========================================
HIDE ALL LOOKUP ACTION BUTTONS GLOBALLY
========================================= */
/* "View parent" button beside lookup fields */
.view_parent {
display: none !important;
}
/* "Add new parent" button beside lookup fields */
.add_new_parent {
display: none !important;
}
I need help in figuring out this error pleaseParse error: syntax error, unexpected '.', expecting end of file in C:\xampp\htdocs\myapp\hooks\__global.php on line 44
TD
Re: How To remove These Buttond
Parsing errors comes as the system is expecting PHP code and not the CSS which was pasted. Please use the updated code:
Code: Select all
?>
<style>
/* =========================================
HIDE ALL LOOKUP ACTION BUTTONS GLOBALLY
========================================= */
/* "View parent" button beside lookup fields */
.view_parent {
display: none !important;
}
/* "Add new parent" button beside lookup fields */
.add_new_parent {
display: none !important;
}
</style>
<?phpRe: How To remove These Buttond
Also, I would recommend that you use
hooks/header-extras.php or hooks/footer-extras.php for globally applied CSS across AppGini page. Lastly, my comments and the two individual selectors were for you to understand and pick which element you want to hide, alternatively you can combine them for a cleaner code:
Code: Select all
?>
<style>
/* Hide the "View parent" and "Add new parent" buttons beside lookup fields on all forms */
.view_parent,
.add_new_parent {
display: none !important;
}
</style>
<?php
Re: How To remove These Buttond
Don't I feel stupid putting CSS in a PHP file! Thank for helping with this, I'll try your suggestion
TD
TD
Re: How To remove These Buttond
I have placed this code in the footer-extra.php then moved it to the header-extra.php file neither made th buttons go away. There were no errors messages it is just that the buttons still appear in my app.
Anyone have any idea how I can remove these buttons ???
Thanks, TD
Code: Select all
?>
<style>
/* =========================================
HIDE ALL LOOKUP ACTION BUTTONS GLOBALLY
========================================= */
/* "View parent" button beside lookup fields */
.view_parent {
display: none !important;
}
/* "Add new parent" button beside lookup fields */
.add_new_parent {
display: none !important;
}
</style>
<?php
Thanks, TD
Re: How To remove These Buttond
Hi,
try to add the code at the top of the file without the ?>.
try to add the code at the top of the file without the ?>.
Code: Select all
<style>
/* =========================================
HIDE ALL LOOKUP ACTION BUTTONS GLOBALLY
========================================= */
/* "View parent" button beside lookup fields */
.view_parent {
display: none !important;
}
/* "Add new parent" button beside lookup fields */
.add_new_parent {
display: none !important;
}
</style>
<?phpAny help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
