Welcome Guest, Not a member yet? Register   Sign In
selected=selected
#1

[eluser]Bigil Michael[/eluser]
is it possible to do selected = selected in case of multiple select box???

can anyone help me? thanks in advance
#2

[eluser]ludovic[/eluser]
Read the guide http://ellislab.com/codeigniter/user-gui...elper.html and search form_dropdown()
#3

[eluser]Bigil Michael[/eluser]
i have already done adding multiple locations using multiple select box
now i want to do edit

values inside the table is like this
Code:
id destinations
1   tvm,kollam,ernakulam

Code:
i have read those values using this code

$loc = $this->Mypackages_model->select_destinations($selected_package);
$k = $loc->destinations;
//now $k = tvm,kollam, ernakulam

$k= explode(",",$k);
$data['locat'] = $k;


view
Code:
<select name="location[]" multiple="multiple" id="location">
                                &lt;?php
                                foreach($locat as $row)
                                {
                                ?&gt;
                                <option value="&lt;?php echo $row['location_name']?&gt;" &lt;?php echo set_select('location',$row['location_name']);?&gt; >&lt;?php echo $row['location_name']?&gt;</option>
                                &lt;?php
                                }
                                ?&gt;
                                 </select>


it only prints the first letters ie t,k,e
can any one help me thanks in advance
#4

[eluser]Bigil Michael[/eluser]
can anyone help me




Theme © iAndrew 2016 - Forum software by © MyBB