allow ticket to be submitted without subject and message

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
Tech NO Babble
Posts: 9
Joined: Thu Jul 15, 2010 8:39 pm

allow ticket to be submitted without subject and message

Post by Tech NO Babble »

Script URL:www.snowbirdbaseball.com/help-desk
Version of script:2.2
Hosting company:Tech NO Babble

What terms did you try when SEARCHING for a solution:Google and help files and looked on this forum.


I have basically used your help desk to act more like form mail as the client likes the program, I use it on www.technobabble.us. I need to allow the ticket to be sent without the subject line or message filled out.

Fantasic program and love the updated features in 2.2!

Alex
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

In the submit_ticket.php change

Code: Select all

$tmpvar['subject']  = hesk_input($_POST['subject']) or $hesk_error_buffer[]=$hesklang['enter_ticket_subject'];
$tmpvar['message']  = hesk_input($_POST['message']) or $hesk_error_buffer[]=$hesklang['enter_message'];
to

Code: Select all

$tmpvar['subject']  = hesk_input($_POST['subject']) or $tmpvar['subject'] = '';
$tmpvar['message']  = hesk_input($_POST['message']) or $tmpvar['message'] = '';
or you can even set a default value if none is entered, like this:

Code: Select all

$tmpvar['subject']  = hesk_input($_POST['subject']) or $tmpvar['subject'] = 'Default subject';
$tmpvar['message']  = hesk_input($_POST['message']) or $tmpvar['message'] = 'Default message';
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
Tech NO Babble
Posts: 9
Joined: Thu Jul 15, 2010 8:39 pm

Post by Tech NO Babble »

Wow...that was quick..I will try that shortly!

Thanks!!

Alex
Tech NO Babble
Posts: 9
Joined: Thu Jul 15, 2010 8:39 pm

Post by Tech NO Babble »

That worked well. Thanks!
Tech NO Babble
Posts: 9
Joined: Thu Jul 15, 2010 8:39 pm

Post by Tech NO Babble »

The help desk is at www.snowbirdbaseball.com/registration-center and I have two more questions.

One if you check out the site and click register (submit ticket) you will see the message box is filled with hmtl code and words.

Option 1: Make the information to show up in the box using html and css to match the layout the client wants.

Option2: Remove the subject and message boxes and just use html and css to put the information needed in the box between the priority and beginning of custom content.

Option 3: Remove the subject and message boxes and I will put the info on other pages and have them click to agree before they get to the help desk.

Thank you for your time,

Alex Molitor
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Sorry, but this kind of customization is out of the scope of my free support here.
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
Stephan1992
Posts: 25
Joined: Tue Oct 12, 2010 3:16 pm

Re: allow ticket to be submitted without subject and message

Post by Stephan1992 »

This does not work for me.

I have created another message field, message2.
It works, but when i enter no message in the field the form will not be sent.
KevEd
Posts: 1
Joined: Thu Mar 07, 2013 4:01 pm

Re: allow ticket to be submitted without subject and message

Post by KevEd »

Thanks for posting up the code, it worked perfectly.

I am trying to insert the category name into the 'subject' field automatically when a form is submitted.
Can I take the PHP code that displays the category name (which the user chose from the category dropdown) and use it to fill the subject field when it creates the email message.
This will show the support team exactly what the question is about, without having to make sense of a users' poor description.
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: allow ticket to be submitted without subject and message

Post by Klemen »

Try this: in submit_ticket.php delete

Code: Select all

$tmpvar['subject']  = hesk_input(hesk_POST('subject')) or $hesk_error_buffer['subject']=$hesklang['enter_ticket_subject'];
then just below

Code: Select all

$row = hesk_dbResult($res);
add

Code: Select all

$tmpvar['subject'] = hesk_getCategoryName($tmpvar['category']);
That should do it.
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
Post Reply