Question

Adding Combobox in new customer form For country,state,city in point of sale using php

<div class="field_row clearfix">
    <?php echo form_label($this->lang->line( 'common_city' ) . ':', 'city' ); ?>
    <div class='form_field'>
        <?php echo form_input(array( 'name'=>'city','id'=>'city','value'=>$person_info->city));?>
    </div>
</div>

In this code it using text box instead of that i need to implement Combobox

Was it helpful?

Solution

i think you are using codeigniter , use form_dropdown

try

<?php echo form_dropdown('dropdown',array('name'=>'city','id'=>'city','value'=>$person_info->city),'name'); ?>

check this

Codeigniter Form Helper

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top