Page 1 of 1

Modify ticket search list

Posted: Mon Aug 27, 2018 10:07 pm
by cwyenberg
I'd like to move "Name" to the top of the ticket search option list since this is the way we most often look for tickets. I've modified the list order in show_search_form.inc.php. "Name" now does appear at the top of the list. However, the focus or default selection is still "Track ID" which is the second on the list and I have to scroll up to select "Name". What am I missing?

Thanks

Re: Modify ticket search list

Posted: Tue Aug 28, 2018 7:13 am
by Klemen
You don't have to make any changes to the HTML, just change

Code: Select all

if ( ! isset($what) )
{
	$what = 'trackid';
}
to

Code: Select all

if ( ! isset($what) )
{
	$what = 'name';
}

Re: Modify ticket search list

Posted: Tue Aug 28, 2018 4:33 pm
by cwyenberg
Perhaps I'm looking in the wrong file but I don't see this code. However, I do see the following beginning at line 396 in show_search_form.inc.php

Code: Select all

<input class="form-control" type="text" name="q" size="30" <?php if (isset($q)) {
                                            echo 'value="' . $q . '"';
                                        } ?>>

Re: Modify ticket search list

Posted: Tue Aug 28, 2018 5:45 pm
by cwyenberg
NVM...found it at line 40. Change works as expected...brilliant.

Thanks