Version of script: 2.4.2 - PHP version: 5.4.30
I've created a custom field named "US Phone Number" in Settings > Custom Field and I checked the "Required" box. The custom field appears with the asterisk (required) on the user side however, from the admin side Home > + New Ticket the custom field appears but it doesn't show as required. How can I make it a required field in "+ New Ticket"?
Thanks in Advance!
HESK Custom Field
Moderator: mkoch227
Re: HESK Custom Field
Fields are not required from admin panel because staff may not always have all the information you can request from a customer.
To make it required, you would need to modify file "admin/admin_submit_ticket.php".
I haven't tested it, but:
1. find line
2. find the first else ABOVE that line.
3. ABOVE that "else" add
To make it required, you would need to modify file "admin/admin_submit_ticket.php".
I haven't tested it, but:
1. find line
Code: Select all
$tmpvar[$k]=hesk_makeURL(nl2br(hesk_input($_POST[$k])))
3. ABOVE that "else" add
Code: Select all
elseif ($v['req'])
{
$tmpvar[$k]=hesk_makeURL(nl2br(hesk_input($_POST[$k])));
if (!strlen($tmpvar[$k]))
{
$hesk_error_buffer[$k]=$hesklang['fill_all'].': '.$v['name'];
}
}
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
Re: HESK Custom Field
Also, to show the red asterisk, in "admin/new_ticket.php" replace with
Twice!
Code: Select all
$v['req'] = '';
Code: Select all
$v['req'] = $v['req'] ? '<font class="important">*</font>' : '';
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: 2
- Joined: Tue Aug 05, 2014 7:56 pm
Re: HESK Custom Field
Thanks for the prompt reply! I'll give it a try.....