Page 1 of 1

field hidden on the edit tab

PostPosted: Thu May 07, 2009 2:00 am
by PolderBoy
Dear All,

I would like to hide a field on the edit tab.
Been looking for the answer for two days. Couldn't find it.

The user isn't allowed to change a field. The program does it in a trigger.

Thanks, PolderBoy

PostPosted: Thu May 07, 2009 7:07 am
by Martin Pruss
Hi PolderBoy
Did you try :

widget:type = hidden

in the fields.ini of that table?

cheers
Martin

PostPosted: Thu May 07, 2009 9:12 am
by PolderBoy
Hello Martin,

Yes I did, but that isn't what I am looking for i only want it to be invisible in the edit page. It should be vissible in the other pages.
Also it is an enum in the MySQL database. ('YES','NO') I have found in this forum that there were/are problems with this.

[PDF_JN]
group=Final_info
widget:type=checkbox
visibility:browse = hidden
visibility:find = hidden


What I am looking for is:
visibility:edit = hidden

But that doesn't work.
If there is a way please explain in a detailed way as I am not a proffesional programmer. I wish I was....

Thank,
PolderBoy

PostPosted: Thu May 07, 2009 9:51 am
by fongchun
I just made a blog post about this that might help you. You can find it here.

It shows you how to make a field uneditable, however it is still visible on the edit form. It might suit your needs. If you need to make it completely invisible on the edit form I can make another post about that since it is a little trickier.

Thanks

PostPosted: Thu May 07, 2009 12:57 pm
by PolderBoy
Perfect,

It isn't exactly what I want but it works. The user isn't allowed to change the value so if he sees the value that's ok.
But where do I put this code? It is php so it has to be in a php file. But which one?

Thanks.

Polderboy

PostPosted: Thu May 07, 2009 1:49 pm
by shannah
That would be in the delegate class for your table. See the getting started tutorial for information on delegate classes.

Thank,

PostPosted: Thu May 07, 2009 2:31 pm
by PolderBoy
Dear All,

Thank you.

Please believe me when I tell you that I have read the tutorials backwards and forwards several times. Printed them and read before going to bed.

I just can't get my fingers behind it. (Dutch proverb)
Probably beacause I am not an object orientated programmer, yet.


Thanks again,
PolderBoy

PostPosted: Thu May 07, 2009 2:54 pm
by fongchun
Well glad we can help!