mohsin917
(Mianmitho)
1
I am using CJuiAutocomplete and getting multiple items.
email, userid, fullname, company_name
I am now just able to show label and use its value
$returnVal[] = array(
'label' => $row2->contact_to_project->email,
'value' => $row2->contact_to_project->email,
'contact_id' => $row2->contact_id,
'email' => $row2->contact_to_project->email,
'name' => $row2->contact_to_project->last_first_name,
'company' => $row2->company->name,
);
I need response at multiple lines in HTML format. LIke
Name: John Smith
Emai: john@gmail.com
Company: MyComp
Name: John Smith
Emai: john@gmail.com
Company: MyComp
Name: John Smith
Emai: john@gmail.com
Company: MyComp
Any idea how to customize items?? or can it be solved by editing theme?? and how??
Are you getting your info from a Database? If so use try using JSON: Yii CJSON
mohsin917
(Mianmitho)
4
I am not sure how to use CJson and also not getting any help from internet…
Also i am getting data from db everything is working fine. i just want to show loaded suggestions (by autocomplete) in specific format.
$this->widget('zii.widgets.jui.CJuiAutoComplete', array(
'name' => 'cc_system_users',
'id' => 'cc-sys-tb',
'value' => '',
'source' => $this->createUrl('common/getSystemUsers', array('project_id' => 0)),
// additional javascript options for the autocomplete plugin
'options' => array(
'minLength' => '1',
'select' => "js: function(event, ui) {
add_sys_jb('cc', ui.item['contact_id'], ui.item['email']);
}"
),
'htmlOptions' => array(
'style' => 'height:20px;width:195px'
),
));
Its working fine also getting multiple items… just want to show each item in different line with some style.
mohsin917
(Mianmitho)
5
waiting for a solution… anybody??
mohsin917
(Mianmitho)
6
Seriously nobody knows anything about it? 