Kayako logo
SupportSuite, eSupport and LiveResponse Discussion, troubleshooting and feedback related to Kayako's flagship support desk products SupportSuite, eSupport and LiveResponse.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  (#1) Old
PDXMan Offline
New Member
 
Posts: 13
Join Date: Jun 2005
Conditionally display file upload form? - 26-07-2005, 11:49 PM

Conditionally display file upload form?

In the client-side, ticket creation window, is it possible to display the file upload form conditionally, based on the department selected?

I have a “General Inquires” department that doesn’t need the form, but I would like it to be available for my paying clients.

Is this possible? If so, where are the settings, I haven’t spotted them yet.

Thanks
   
Reply With Quote
  (#2) Old
greengiant Offline
Member
 
Posts: 103
Join Date: Feb 2004
27-07-2005, 12:07 AM

I don't think this is currently possible. You should open a feature request for this at http://bugs.kayako.net/
   
Reply With Quote
  (#3) Old
Varun Shoor Offline
Chief Executive Officer
 
Varun Shoor's Avatar
 
Posts: 2,829
Join Date: May 2003
28-07-2005, 09:11 PM

It might be possible using templates, You might want to check the hidden field tag for departmentid and then you can do something like:

<if $departmentid == "1" || $departmentid == "3"}>
The upload form html code here
<{/if}>

Regards,

Varun Shoor


Varun Shoor (varun.shoor ]at[ kayako.com)
----------------------------------------------------------------
---
   
Reply With Quote
  (#4) Old
PDXMan Offline
New Member
 
Posts: 13
Join Date: Jun 2005
Fixed typo. . . - 04-08-2005, 10:21 PM

Well, I gave it a try and it stopped the whole page from loading somehow?

I should just be able to wrap the whole thing like this right?

<if $departmentid == "3" || $departmentid == "5"}>

<{if $settings[t_cenattach] == 1}>
<fieldset class="swiftfieldset">
<legend><{$language[tuploadfile]}></legend>
<table width="100%" border="0" cellspacing="1" cellpadding="4">
<{for start=0 stop=$settings[t_cmaxattach] step=1 value=current}>
<tr>
<td width="100%"><span class="smalltext"><input type="file" name="opt_file[<{$current}>]" value="" size="35" class="swifttext" /></span></td>
</tr>
<{/for}>
</table>
</fieldset>
<{/if}>

<{/if}>

Or am I breaking some php rule I've forgotten about?

Thanks for your help.

Last edited by PDXMan; 04-08-2005 at 10:23 PM. Reason: Typo. . .
   
Reply With Quote
  (#5) Old
greengiant Offline
Member
 
Posts: 103
Join Date: Feb 2004
04-08-2005, 10:32 PM

The if statement that varun posted was missing a { it should have read as follows. That might be the problem

<{if $departmentid == "1" || $departmentid == "3"}>
   
Reply With Quote
  (#6) Old
Varun Shoor Offline
Chief Executive Officer
 
Varun Shoor's Avatar
 
Posts: 2,829
Join Date: May 2003
04-08-2005, 10:42 PM

Yep, Thanks for pointing out!

Regards,

Varun Shoor


Varun Shoor (varun.shoor ]at[ kayako.com)
----------------------------------------------------------------
---
   
Reply With Quote
  (#7) Old
PDXMan Offline
New Member
 
Posts: 13
Join Date: Jun 2005
Almost. . . but not quite. - 08-08-2005, 09:09 PM

I don't know why I didn't see that. . .

Well now the page loads, but the upload form won't show for any department.

;~D I feel a feature request coming on. . . do you feel it too?

Any other way of doing this?
   
Reply With Quote
  (#8) Old
Neil-UKWSD Offline
Member
 
Neil-UKWSD's Avatar
 
Posts: 868
Join Date: Jun 2003
Location: United Kingdom
08-08-2005, 10:09 PM

Hi,

No need for a feature request, here is the code you need:

PHP Code:
<{if $department[departmentid] == "X" || $department[departmentid] == "X"}>

attachment code here

<{/if}> 
Replace X above with your Department ID's where the attachment form should show.


Neil Wood | UK Web.Solutions Direct Ltd

UK cPanel/WHM hosting accounts
http://ukwebsolutionsdirect.co.uk
   
Reply With Quote
  (#9) Old
PDXMan Offline
New Member
 
Posts: 13
Join Date: Jun 2005
11-08-2005, 05:04 PM

Sweet success. . . . .

Thank you Neil!
   
Reply With Quote
  (#10) Old
digitalibiz Offline
Member
 
Posts: 60
Join Date: Aug 2003
17-02-2008, 09:33 PM

Which part in the submitticket is the attachment code?

I wrapped it around:

==> <{if $settings[t_cenattach] == 1}>
<fieldset class="swiftfieldset">
<legend><{$language[tuploadfile]}></legend>
<table width="100%" border="0" cellspacing="1" cellpadding="4">
<{for start=0 stop=$settings[t_cmaxattach] step=1 value=current}>
<tr>
<td width="100%"><span class="smalltext"><input type="file" name="opt_file[<{$current}>]" value="" size="35" class="swifttext" /></span></td>
</tr>
<{/for}>
</table>
</fieldset>
<{/if}> <==

and it did not work.
   
Reply With Quote
  (#11) Old
craigbrass Offline
Senior Member
 
Posts: 5,734
Join Date: Jun 2005
Location: Cumbria, UK
18-02-2008, 11:46 AM

Did you clear the /cache/ directory using FTP software afterwards? I suspect this is the issue.


Craig Brass - Kayako Forum Squatter (Note: I am NOT a staff member)

Icon Headquarters - Its Elixir - Web2Messenger
   
Reply With Quote
Reply

Tags
conditionally, display, form, upload

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I adjust upload file size? sqzdog Technical Chat 5 23-07-2007 11:08 AM
Trying to upload file for downloads section Siora SupportSuite, eSupport and LiveResponse 6 10-05-2007 03:16 PM
Key.php - Update URL Field BEFORE you Upload File. kropes SupportSuite, eSupport and LiveResponse 5 27-11-2006 09:38 AM
File upload error message albinjoseph Developers & Code 1 28-06-2006 07:27 PM



Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46