Script URL: s1.grad.gatech.edu/hesk/
Version of script: 2.8.2
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: Clear custom fields
Write your message below:
We are starting to get walk-in traffic and want to have these folks fill out a help ticket in a specific category (walk-in). We plan to have a computer setup in Kiosk mode to load just this form: http://s1.grad.gatech.edu/hesk/index.ph ... category=4 (this is on our test environment, not production).
Once the person completes and submits we want to have them click on "Home" and it will go back to this form. All of this works, however, when the form reloads the custom fields are not cleared out. Their name, email and other regular form items are all cleared out but any custom fields keep the data from when the form was last submitted.
Is there some way to force these fields to also be cleared out? We already use Hesk as our helpdesk and would like to just expand on it with our walk-in folks. However we can't have any of the fields show previous person's data so I need to figure out a way to flush these fields when the form reloads.
Any ideas greatly appreciated. I've tried setting browser settings to not save any form data and I've even run the form in privacy mode but the custom fields won't clear unless you close and re-open the browser. Need them to clear without closing and re-opening the browser.
Custom fields not cleared when form reloads
Moderator: mkoch227
Custom fields not cleared when form reloads
Sean Porter
Web Developer/Business Analyst
Georgia Tech
Web Developer/Business Analyst
Georgia Tech
Re: Custom fields not cleared when form reloads
It looks like the custom fields are not properly cleared from the session, which is why they persist when loading the create ticket page. I haven't tested this fix, but you can try making the following change to submit_ticket.php and see if it works properly without errors (make a backup of your current submit_ticket.php file you can revert to in case this doesn't fix the issue
):
Find:
Just after that line, add the following:

Find:
Code: Select all
hesk_cleanSessionVars('img_verified');
Code: Select all
foreach ($hesk_settings['custom_fields'] as $k => $v)
{
hesk_cleanSessionVars("c_$k");
}
Mike, Lead Developer of
HESK: A surprisingly simple, user-friendly and FREE help desk software with integrated knowledgebase.
Re: Custom fields not cleared when form reloads
Mike,
Yep, that works! Thanks I appreciate the quick response!!
Yep, that works! Thanks I appreciate the quick response!!
Sean Porter
Web Developer/Business Analyst
Georgia Tech
Web Developer/Business Analyst
Georgia Tech
Re: Custom fields not cleared when form reloads
It's not a bug, it's a feature
This was actually by design. It may be better to add a setting in the future to allow Hesk admin to control this behavior.
Thanks Mike for providing a quick work-around.

This was actually by design. It may be better to add a setting in the future to allow Hesk admin to control this behavior.
Thanks Mike for providing a quick work-around.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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