Page 1 of 1
allow ticket to be submitted without subject and message
Posted: Thu Jul 15, 2010 8:57 pm
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
Posted: Thu Jul 15, 2010 9:03 pm
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';
Posted: Thu Jul 15, 2010 9:19 pm
by Tech NO Babble
Wow...that was quick..I will try that shortly!
Thanks!!
Alex
Posted: Fri Jul 16, 2010 6:05 pm
by Tech NO Babble
That worked well. Thanks!
Posted: Sat Jul 17, 2010 4:51 pm
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
Posted: Sun Jul 18, 2010 9:18 am
by Klemen
Sorry, but this kind of customization is out of the scope of my free support here.
Re: allow ticket to be submitted without subject and message
Posted: Tue Oct 26, 2010 12:35 pm
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.
Re: allow ticket to be submitted without subject and message
Posted: Fri Mar 08, 2013 10:00 am
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.
Re: allow ticket to be submitted without subject and message
Posted: Mon Mar 11, 2013 9:11 am
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
add
Code: Select all
$tmpvar['subject'] = hesk_getCategoryName($tmpvar['category']);
That should do it.