customer fields dropdown row1 iserror -- Please select --

Everything related to Hesk - helpdesk software

Moderator: mkoch227

Post Reply
bigmove1
Posts: 2
Joined: Sat Oct 04, 2014 4:16 am

customer fields dropdown row1 iserror -- Please select --

Post by bigmove1 »

/index.php?a=add

Help me please!!

new ticket

first row index=1 customer fields type select box

$_SESSION['iserror']

-- Please select --

this modify ??

Code: Select all

/* Select drop-down box */
	            case 'select':



                						$cls = in_array($k,$_SESSION['iserror']) ? ' class="isError" ' : '';
					echo '
					<tr>
					<td style="text-align:right" width="150">'.$v['name'].': '.$v['req'].'</td>
	                <td width="80%"><select name="'.$k.'" '.$cls.'>';
					
					

	            	$options = explode('#HESK#',$v['value']);
					

					
	                foreach ($options as $option)
	                {

		            	if (strlen($k_value) == 0 || $k_value == $option)
		                {
	                    	$k_value = $option;
	                        $selected = 'selected="selected"';
		                }
	                    else
	                    {
	                    	$selected = '';
	                    }

	                	echo '<option '.$selected.'>'.$option.'</option>';
	                }

	                echo '</select></td>
					</tr>
					';

example category

/index.php

Code: Select all

<select name="category" onchange="javascript: dropdownlist(this.options

[this.selectedIndex].value);"<?php if (in_array('category',$_SESSION['iserror'])) {echo ' class="isError" ';} 

elseif (in_array('category',$_SESSION['isnotice'])) {echo ' class="isNotice" ';} ?> >
	<option value="">-- Please select --</option
Klemen
Site Admin
Posts: 10135
Joined: Fri Feb 11, 2005 4:04 pm

Re: customer fields dropdown row1 iserror -- Please select -

Post by Klemen »

I am not sure if I understand correctly, but try after

Code: Select all

<select name="'.$k.'" '.$cls.'>
add

Code: Select all

<option value="">-- Please select --</option>
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
bigmove1
Posts: 2
Joined: Sat Oct 04, 2014 4:16 am

Re: customer fields dropdown row1 iserror -- Please select -

Post by bigmove1 »

Klemen wrote:I am not sure if I understand correctly, but try after

Code: Select all

<select name="'.$k.'" '.$cls.'>
add

Code: Select all

<option value="">-- Please select --</option>

I test your solution already but default select at choice A
1. create new ticket
2. after push button submit ticket
-- Please select --
choice A << default
choice B
choice C
choice E

I want to set up default select at -- Please select --
-- Please select -- << default
choice A
choice B
choice C
choice E
Klemen
Site Admin
Posts: 10135
Joined: Fri Feb 11, 2005 4:04 pm

Re: customer fields dropdown row1 iserror -- Please select -

Post by Klemen »

A few lines above that code try removing

Code: Select all

strlen($k_value) == 0 || 
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
Post Reply