Page 1 of 1

Hide fields

Posted: 2021-02-17 17:56
by fciprian
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>
<?
}
?>

Re: Hide fields

Posted: 2021-02-25 23:52
by fciprian
As i investigate, it happends when is READ ONLY set in AppGini at that field.

Can anyone help me?

Thank you

Re: Hide fields

Posted: 2021-02-26 21:58
by pbottcher
Hi,

what kind of field are you trying to hide?

Re: Hide fields

Posted: 2021-03-13 10:30
by fciprian
Hello

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

Thank you verry much for your time!

Re: Hide fields

Posted: 2021-03-13 11:21
by pbottcher
Hi,

try to change

Code: Select all

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

Code: Select all

$j('.'+AppGini.currentTableName()+'-Editor').hide()

Re: Hide fields

Posted: 2021-03-13 19:10
by fciprian
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!

Re: Hide fields

Posted: 2021-03-14 21:00
by pbottcher
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()