How do I change the default cakephp in the selected list?

advertisements

I need to change cakephp default value from select box.Here in controller I have coded

$madDivisions = $this->MadStore->MadDivisions->find('list');

In view

<?php
      echo $this->Form->input('mad_divisions_id',array( 'label' => false, 'class'=>'form-control','id'=>'select' ));
?>

After add jquery val() method

<script>
    $('#select').change(function(){
        var a=$('#select').val();
        alert(a);
    })
</script>

It showing me 1,2......

But I want to change this default value and want to replace divisions name as a value.Like as

<option value="London">London</option>
<option value="Dhaka">Dhaka</option>


Try this for find method with list

    $madDivisions = $this->MadStore->MadDivisions->find(    'list',
                                                            array(
                                                                    'fields' => array(
                                                                                    'city_name',
                                                                                    'city_name'
                                                                                )
                                                            )
                                                        );

city_name is the column name from database table which contains values for London, Dhaka.