Hiding a customized field from end user eyes

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
huogas
Posts: 17
Joined: Thu Sep 23, 2010 10:32 pm

Hiding a customized field from end user eyes

Post by huogas »

Hello

Is it possible to hide a (one or many) customized field(s) from the end users ?

Thanks

Gaston
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Hiding a customized field from end user eyes

Post by Klemen »

Open ticket.php in notepad and find

Code: Select all

$v['use'] && $v['place']==0
and change it to

Code: Select all

$v['use'] && $v['place']==0 && !in_array($k,array('custom1','custom2','custom3'))
Similarly change

Code: Select all

$v['use'] && $v['place']
to

Code: Select all

$v['use'] && $v['place'] && !in_array($k,array('custom1','custom2','custom3'))
This should hide the first, second and third custom field from the customer. You can change the list by modifying 'custom1', 'custom2','custom3'.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
huogas
Posts: 17
Joined: Thu Sep 23, 2010 10:32 pm

Re: Hiding a customized field from end user eyes

Post by huogas »

Hello

Doesn't seem to make it.
Just to make sure, the targeted page was the one used by a end user to submit a ticket (submit_ticket.php).

"http://domain.com/hesk/index.php?a=add&language=English"

Gaston
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Hiding a customized field from end user eyes

Post by Klemen »

Wait, you don't even want the customer to enter anything in custom fields when submitting a ticket?

Or do you want the customer to enter the details but not be able to see them afterwards?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
huogas
Posts: 17
Joined: Thu Sep 23, 2010 10:32 pm

Re: Hiding a customized field from end user eyes

Post by huogas »

I want to be able to mark some custom fields as "internal". I mean that those fields won't appears in any client pages, essentially the page used to submit a new ticket and the page used to see the status of a request. "Not internal" (or public) fields would be accessible on these pages.

Sorry if I was not clear.

Gaston
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Hiding a customized field from end user eyes

Post by Klemen »

Try modifying the same code in the index.php - so you have that code modified in both index.php and ticket.php
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
huogas
Posts: 17
Joined: Thu Sep 23, 2010 10:32 pm

Re: Hiding a customized field from end user eyes

Post by huogas »

What was doing the modification in index.php ?

Gaston
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Hiding a customized field from end user eyes

Post by Klemen »

Should be the same code in both files (the code I posted few replies back).

In index.php it will hide the fields from the "submit a ticket" form and in ticket.php it will hide the fields when the customer is looking at the ticket.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
huogas
Posts: 17
Joined: Thu Sep 23, 2010 10:32 pm

Re: Hiding a customized field from end user eyes

Post by huogas »

That works perfectly :D . Don't you think it should become a feature (a custom field being marked as hidden ?

Thanks

Gaston
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Hiding a customized field from end user eyes

Post by Klemen »

Already added on my "to do" list for version 2.3 :wink:
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
manny
Posts: 1
Joined: Thu Apr 14, 2011 9:00 pm

Re: Hiding a customized field from end user eyes

Post by manny »

Hi,

I have followed the above directions but can't seem to get it to work. After I apply the changes to both index.php and ticket.php, I get a white page? Any ideas why?

Here is what I inputted.

if ($v['use'] && $v['place']==0 && !in_array($k,array('custom3'))

if ($v['use'] && $v['place'] && !in_array($k,array('custom3'))
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Hiding a customized field from end user eyes

Post by Klemen »

You get an error probably because you have PHP syntax error in the edited files. Try enabling debug mode in admin panel and see if you get any error messages then.

Also note that 'custom3' should be changed to the custom field number you wish to hide.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
AKNL
Posts: 15
Joined: Mon Aug 08, 2011 9:48 am

Re: Hiding a customized field from end user eyes

Post by AKNL »

I need this function too...only thing left is to edit it outside of the post itself...like in the main admin somehwere.
Dont need to click like 4 times before i can edit the field.
Post Reply