Page 1 of 1

RESOLVED: Adding a toggle link to view the custom fields

Posted: Thu Nov 01, 2007 3:28 pm
by jnicastr
Script URL: Hesk
Version of script: 0.94.1
Hosting company: Private (intranet)
URL of phpinfo.php: private, n/a
URL of session_test.php: private, n/a
What terms did you try when SEARCHING for a solution: Tried everything

Write your message below:

Hello,

Index page has a javascript that toggles the "Forgot your TAC tracking ID?" fields....

I would like to incorporate this so that you can toggle the "custom fields" when submitting a ticket. In other words, the customer would have a link or button that toggles the display of the custom fields on the submit form...otherwise he/she would only see the required fields at the top (name, email, category, priority, subject and message)

If possible (and easy enough to do) please share how...this is very useful.

MANY THANKS

PS - I posted on other section but have not received reply. I'm posting here in case it was in the wrong area

Posted: Thu Nov 01, 2007 4:03 pm
by Klemen
Try this:

open index.php in Notepad and change line 138 from

Code: Select all

echo '<table border="0">';
to

Code: Select all

echo '<p><a href="Javascript:void(0)" onClick="Javascript:hesk_toggleLayerDisplay(\'custom\')">Show more options</a></p><div id="custom" style="display: none;"><table border="0">';
and line 155 from

Code: Select all

echo '</table> <hr>';
to

Code: Select all

echo '</table></div> <hr>';
Do the same for lines 179 and 196.

Save, upload and test. Didn't test it myself, but should work.

Posted: Thu Nov 01, 2007 4:11 pm
by jnicastr
Will try and test, if it works...I will make a donation for your time. Thanks...

Nice!

Posted: Thu Nov 01, 2007 8:03 pm
by jnicastr
Worked perfectly...thank you. Now for that donation...

Posted: Thu Nov 01, 2007 9:47 pm
by jnicastr
Here you go buddy

2Checkout.com Order Number 3831505320

Posted: Thu Nov 01, 2007 10:08 pm
by Klemen
Thanks, donations/license purchases are welcome but in no way required.

Posted: Fri Nov 02, 2007 9:51 pm
by jnicastr
Well...the way I look at it is this. You take personal time to help with a custom item outside the realm of normal support...you should be compensated. Plus, mods help me learn the way the engine works a bit. Maybe not directly, but it can open my eyes to other things. So all in all, I don't mind sending a token of appreciation. Plus I get a license :P