Help Desk Software & Beyond
May 23, 2012, 06:06:26 AM *
Welcome, Guest. Please login or register.
To post messages you need to register. We apologize for inconvenience, but this is to prevent spam.
Registration is instant (no email verification) and we do not ask for any personal information.

Login with username, password and session length
News: Welcome to Help Desk Software forum!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: [MOD] New Ticket Problem Field Mandatory  (Read 2540 times)
rozwellite
Newbie
*

Karma: 2
Posts: 43



View Profile
« on: August 12, 2008, 12:20:35 PM »

We are having numerous users submit tickets with blank problems. I have made everything else mandatory but not positive on how to make this mandatory. If someone could please point me in the right director I would really appreciated it. Thanks in advance.
« Last Edit: August 12, 2008, 02:39:26 PM by Sparky » Logged
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #1 on: August 12, 2008, 01:30:13 PM »

Quote
<input type="hidden" name="mandatory" value="problem">

in between the <form></form> tags on the newticket.html template.

IF YOU ALREADY HAVE A hidden field named "mandatory", do NOT create a second one.  Just add the word "problem" to the value="" separating each with a comma.

Quote
value="whatever,thisone,thatone,problem"
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
rozwellite
Newbie
*

Karma: 2
Posts: 43



View Profile
« Reply #2 on: August 12, 2008, 01:57:14 PM »

Mandatory only works if I add it before </form>. I added problem at the end but now it won't let any tickets be submitted even with the problem filled in. It always says missing problem.


Code:
      </tr>
<input type="hidden" name="mandatory" value="xPhone,xLocation,xRoom/Suite,xCategory,problem">
</form>
      </table>
    </td>
  </tr>
</table>
<form method="post" action="(%ENV_SCRIPT_NAME%)" id="formpreview" target="winpreview" >
<input type=hidden name=cmd value=preview>
<input type=hidden name=style value="(%INPUT_style%)">
<input type=hidden name=sid value=(%INPUT_sid%)>
<input type=hidden name=key value=(%INPUT_key%)>
<input type=hidden name=msg>
</form>
Logged
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #3 on: August 12, 2008, 02:06:21 PM »

Mandatory only works if I add it before </form>.

Yes, between the <form></form> tags would mean before the </form> tag.  Wink

But I'm not sure why it's not working.  I recall this issue from before.  Give me some time.
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
rozwellite
Newbie
*

Karma: 2
Posts: 43



View Profile
« Reply #4 on: August 12, 2008, 02:07:39 PM »

I just found another post about this question and Alex responded that it would have to be changed via java script.
Logged
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #5 on: August 12, 2008, 02:20:41 PM »

http://forum.unitedwebcoders.com/index.php/topic,166.msg664.html#msg664

He also said a perl modification was an option.

Sit tight and I'll see about making this mod today.
« Last Edit: August 12, 2008, 02:51:26 PM by Sparky » Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #6 on: August 12, 2008, 02:36:31 PM »

In TTXTicket.pm, newticket subroutine...

Find blue and add the red...

Quote
my $error;
$ticket->{problem} = TTXCommon::cleanit($query, 'problem', 1);
if ($ticket->{problem} eq undef) {
     $error .= '[%Missing Problem Description%]<br>';
}
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
rozwellite
Newbie
*

Karma: 2
Posts: 43



View Profile
« Reply #7 on: August 12, 2008, 02:43:57 PM »

Awesome!! Works perfectly. You are great as usual.
Logged
Mortisdeum
Newbie
*

Karma: 0
Posts: 1



View Profile
« Reply #8 on: August 22, 2008, 03:18:09 PM »

Thanks for the input, this worked great, however it did not work with required fields that have drop down menus.  Even when we selected a choice in the menu it still said that we did not fill in the field.  Any suggestions?
Logged
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #9 on: August 22, 2008, 03:36:09 PM »

Quote
... however it did not work with required fields that have drop down menus.

It's not supposed to.

Because custom fields are made mandatory with the hidden field item named "mandatory" as per TTX form setup instructions.

http://www.troubleticketexpress.com/mail-form.html

I strongly recomend a single hidden field named "mandatory" containing all the required items as per the first example on the page...

Quote
Marking custom fields as mandatory. (Note: the feature requires rel.2.10 or newer). In order to mark any or all custom fields as mandatory use a 'mandatory' input in your form. Value of the input must contain a list of all the custom fields, what may not be left blank.

Example:
<input type=hidden name=mandatory value="xPhone,xDepartment">

This hidden field must be contained between the correct set of <form> ... </form> tags.  Must be within the form named "newticket".
« Last Edit: August 22, 2008, 03:40:22 PM by Sparky » Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1 RC3 | SMF © 2001-2006, Lewis Media Valid XHTML 1.0! Valid CSS!
Page created in 0.028 seconds with 20 queries.