Hide fields

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
fciprian
Veteran Member
Posts: 52
Joined: 2020-04-20 10:51

Hide fields

Post by fciprian » 2021-02-17 17:56

Hello
After upgrading to the latest release, the posibility to hide a field in detail view dosen t work now. what is wrong? the field is always showed now. Thank you.

In footer-extras.php :

<?
$memberInfo = getMemberInfo();
$manageri=array('Admins','Cip');
if(!in_array($memberInfo['group'] , $manageri)){
?>
<script type='text/javascript'>
document.observe("dom:loaded", function() {
$j('label[for="Editor"]').parent().hide();
});
</script>
<?
}
?>

fciprian
Veteran Member
Posts: 52
Joined: 2020-04-20 10:51

Re: Hide fields

Post by fciprian » 2021-02-25 23:52

As i investigate, it happends when is READ ONLY set in AppGini at that field.

Can anyone help me?

Thank you

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

Re: Hide fields

Post by pbottcher » 2021-02-26 21:58

Hi,

what kind of field are you trying to hide?
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.

fciprian
Veteran Member
Posts: 52
Joined: 2020-04-20 10:51

Re: Hide fields

Post by fciprian » 2021-03-13 10:30

Hello

I try to hide VarChar with <%%editorUsername%%>
With "Read only" and "Hide in table view" checked.

Thank you verry much for your time!

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

Re: Hide fields

Post by pbottcher » 2021-03-13 11:21

Hi,

try to change

Code: Select all

$j('label[for="Editor"]').parent().hide();
to

Code: Select all

$j('.'+AppGini.currentTableName()+'-Editor').hide()
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.

fciprian
Veteran Member
Posts: 52
Joined: 2020-04-20 10:51

Re: Hide fields

Post by fciprian » 2021-03-13 19:10

Thank you verry much for your time.
It works, but it hides on detail and also on table view.

It is my bad that i did not specify i need to hide only on detail view.

Thank you!

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

Re: Hide fields

Post by pbottcher » 2021-03-14 21:00

Hi,

ok, good to know as you wrote
With "Read only" and "Hide in table view" checked.
so try

Code: Select all

if (!$j('.table_view').length) $j('.'+AppGini.currentTableName()+'-Editor').hide()
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