field hidden on the edit tab
Archived from the Xataface Users forum.
PolderBoy — Thu May 07, 2009 2:00 am
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
Martin Pruss — Thu May 07, 2009 7:07 am
Hi PolderBoy
Did you try :
widget:type = hidden
in the fields.ini of that table?
cheers
Martin
PolderBoy — Thu May 07, 2009 9:12 am
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
fongchun — Thu May 07, 2009 9:51 am
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.
PolderBoy — Thu May 07, 2009 12:57 pm
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
shannah — Thu May 07, 2009 1:49 pm
That would be in the delegate class for your table. See the getting started tutorial for information on delegate classes.
PolderBoy — Thu May 07, 2009 2:31 pm
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
fongchun — Thu May 07, 2009 2:54 pm
Well glad we can help!