I'm using a codeigniter and use form_help for form. I have a dropdown list but I have a lot of data from my dropdown list so I want to make a input a text and autodetect values on dropdown list.
I use this guide https://www.codeigniter.com/userguide3/helpers/form_helper.html but I cannot find my solution.
check this reference for desire output
My result and code
<div class="col-lg-3">
<label class="control-label"><?php echo $required_notice . $val_option['option'] ?><?php if(!empty($options_lang[$key][$key_option]->hint)):?><i class="icon-question-sign hint" data-hint="<?php echo $options_lang[$key][$key_option]->hint;?>"></i><?php endif;?></label>
<div class="controls">
<?php
if (isset($options_lang[$key][$key_option])) {
$drop_options = array_combine(explode(',', check_combine_set(isset($options_lang[$key]) ? $options_lang[$key][$key_option]->values : '', $val_option['values'], '')), explode(',', check_combine_set($val_option['values'], isset($options_lang[$key]) ? $options_lang[$key][$key_option]->values : '', '')));
} else {
$drop_options = array();
}
$drop_selected = set_value('option' . $val_option['id'] . '_' . $key, isset($estate['option' . $val_option['id'] . '_' . $key]) ? $estate['option' . $val_option['id'] . '_' . $key] : '');
echo form_dropdown('option' . $val_option['id'] . '_' . $key, $drop_options, $drop_selected, 'class="form-control" id="inputOption_' . $key . '_' . $val_option['id'] . '" placeholder="' . $val_option['option'] . '" ' . $required_text)
?>
</div>
</div>
Result
Thankyou !