Script URL:
Version of script:
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
Write your message below:
Hey guys, thanks for all the help so far.
We was wondering if anyone could tell us how to make the maximum characters allowed in the message field & subject on the support ticket. We dont know which file to look at.
We dont want people cutting and pasting emails into the ticket or rambling on. So if there's a way to say have a 300 character max and only have the subject field only to have 5 numeric characters. The subject field would only allow a person to enter numeric values only.
If anyone could tell us how to do it and to which file it would be appriciated.
Thanks again for everything.
Making Message Field Have Maximum Characters Allowed
Moderator: mkoch227
-
- Posts: 28
- Joined: Thu Sep 25, 2008 3:19 am
It's in "submit_ticket.php". Open it in a plain text ediotr (Wordpad, Notepad, ...) and change to and BELOW paste this code (modify numbers to fit your requirements):
Code: Select all
$subject=hesk_input($_POST['subject']) or $hesk_error_buffer[]=$hesklang['enter_ticket_subject'];
Code: Select all
$subject=hesk_isNumber($_POST['subject']) or $hesk_error_buffer[]='Enter digits 0-9 only for the subject';
Code: Select all
$message=hesk_input($_POST['message']) or $hesk_error_buffer[]=$hesklang['enter_message'];
Code: Select all
if (strlen($subject) > 5 || preg_match())
{
$hesk_error_buffer[]='Your subject is too long, limit it to 5 chars.';
}
if (strlen($message) > 300)
{
$hesk_error_buffer[]='Your message is too long, limit it to 300 chars.';
}
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
-
- Posts: 28
- Joined: Thu Sep 25, 2008 3:19 am
Enable debug mode in settings then submit it again and see if you get an error message.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
-
- Posts: 28
- Joined: Thu Sep 25, 2008 3:19 am
This is probably because you have an extra { somewhere that is not properly closed with an }
If you can't find it I'd recommend doing it from scratch.
If you can't find it I'd recommend doing it from scratch.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
-
- Posts: 28
- Joined: Thu Sep 25, 2008 3:19 am