Custom select/radio feilds - inserting a null

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
joeyh
Posts: 4
Joined: Fri Jan 14, 2011 5:41 pm

Custom select/radio feilds - inserting a null

Post by joeyh »

Script URL: https://support.altonschools.org/Tech/
Version of script: 2.2
Hosting company: Self hosted (IIS on Win2k3)
URL of phpinfo.php: http://support.altonschools.org/phpinfo.php
URL of session_test.php:
What terms did you try when SEARCHING for a solution: "select", "null value", "null default"

Write your message below:

We're using Hesk as an internal help desk to manage reports of computer problems within our school district. We have a custom select field which allows a user to select which campus they are at. However, a lot of our users are ignoring this and just leaving it set to the first option on the list. Is there an option somewhere that will let us set the default option of a select or radio option to be a null value, forcing a "missing field" error when they neglect to select a value?
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Custom select/radio feilds - inserting a null

Post by Klemen »

You can try modifying index.php file: chnage

Code: Select all

<select name="'.$k.'">
to

Code: Select all

<select name="'.$k.'"><option value="">- Click to Select -</option>
It's locted twice in the file.

You will also need to remove

Code: Select all

strlen($k_value) == 0 || 
twice - remove the ones just below the code you modify, not any other ones!
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
joeyh
Posts: 4
Joined: Fri Jan 14, 2011 5:41 pm

Re: Custom select/radio feilds - inserting a null

Post by joeyh »

That worked like a charm, thank you :D
snifty
Posts: 40
Joined: Thu Aug 26, 2010 2:21 pm

Re: Custom select/radio feilds - inserting a null

Post by snifty »

This trick still works in 2.5.2.

Although the first line change looks like that:

Code: Select all

<td width="80%"><select name="'.$k.'" '.$cls.'><option value="">- Click to Select -</option>';
The second change keeps the same like mentioned from Klemen.
Post Reply