How To remove These Buttond

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
dlee
Veteran Member
Posts:176
Joined: 2020-04-14 00:21
Location: South Carolina, USA
Contact:

How To remove These Buttond

Post by dlee » 2026-10-01 22:20

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
Attachments
remove buttons.png
remove buttons.png (6.82 KiB) Viewed 1248 times

saymaad
AppGini Super Hero
AppGini Super Hero
Posts:130
Joined: 2024-06-03 16:17

Re: How To remove These Buttond

Post by saymaad » 2026-10-02 07:51

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;
}
That will hide those buttons for every lookup field throughout the application, but for a specific lookup only, such as the 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;
}
If you want to remove these email launch buttons throughout the application without naming every email field:

Code: Select all

button[onclick*="mailto:"] {
	display: none !important;
}
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

$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
});

dlee
Veteran Member
Posts:176
Joined: 2020-04-14 00:21
Location: South Carolina, USA
Contact:

Re: How To remove These Buttond

Post by dlee » 2026-10-07 19:22

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;
}
Thank you for helping with this! In which file would I place this code?

dlee
Veteran Member
Posts:176
Joined: 2020-04-14 00:21
Location: South Carolina, USA
Contact:

Re: How To remove These Buttond

Post by dlee » 2026-10-08 21:59

I added this code to the \hooks/__global.php

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;
}
Now when I reload the app I get this error message
Parse error: syntax error, unexpected '.', expecting end of file in C:\xampp\htdocs\myapp\hooks\__global.php on line 44
I need help in figuring out this error please
TD

saymaad
AppGini Super Hero
AppGini Super Hero
Posts:130
Joined: 2024-06-03 16:17

Re: How To remove These Buttond

Post by saymaad » 2026-10-09 11:12

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>
<?php

saymaad
AppGini Super Hero
AppGini Super Hero
Posts:130
Joined: 2024-06-03 16:17

Re: How To remove These Buttond

Post by saymaad » 2026-10-09 11:19

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

dlee
Veteran Member
Posts:176
Joined: 2020-04-14 00:21
Location: South Carolina, USA
Contact:

Re: How To remove These Buttond

Post by dlee » 2026-10-09 15:55

Don't I feel stupid putting CSS in a PHP file! Thank for helping with this, I'll try your suggestion
TD

dlee
Veteran Member
Posts:176
Joined: 2020-04-14 00:21
Location: South Carolina, USA
Contact:

Re: How To remove These Buttond

Post by dlee » 2026-10-09 19:51

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.

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
Anyone have any idea how I can remove these buttons ???
Thanks, TD

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts:1752
Joined: 2018-04-01 10:12

Re: How To remove These Buttond

Post by pbottcher » 2026-10-09 20:38

Hi,

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>
<?php
Any 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.

Post Reply