[SOLVED] Require full name on ticket creation

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
shadedk
Posts: 36
Joined: Fri Aug 07, 2020 1:17 pm

[SOLVED] Require full name on ticket creation

Post by shadedk »

Hello,

Is it possible to require full name, or just two words in the ticket creations form?

We have just on one first name 7 persons with the same name, and when they (and other with same first name) create tickets they only write their first name and not full name. So we need to open the ticket and click on the name, so when can see their e-mail before we can see who it really are.

Thanks.
Last edited by shadedk on Fri Feb 11, 2022 1:46 pm, edited 1 time in total.
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Require full name on ticket creation

Post by Klemen »

The simple solution to this would be to check if the name contains a space or not.

Try this:
1. open submit_ticket.php in Notepad++
2. find the first line that starts with

Code: Select all

$tmpvar['name']
3. just below that line add

Code: Select all

if ( ! strpos($tmpvar['name'], ' ')) {
    $hesk_error_buffer['name'] = 'Please enter your full name';
}
4. save and test

Not perfect, but should do the basic job.
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
shadedk
Posts: 36
Joined: Fri Aug 07, 2020 1:17 pm

Re: Require full name on ticket creation

Post by shadedk »

Works like a charm. Thanks.

I've bought you a drink for all the good help through the years, have a great weekend :)
Post Reply