Page 1 of 1

customer fields dropdown row1 iserror -- Please select --

Posted: Sat Oct 04, 2014 4:34 am
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

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

Posted: Sat Oct 04, 2014 5:54 pm
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>

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

Posted: Tue Oct 07, 2014 5:15 am
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

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

Posted: Tue Oct 07, 2014 7:30 am
by Klemen
A few lines above that code try removing

Code: Select all

strlen($k_value) == 0 ||