Hi there,
in CF5 I have this code to run the event "Autocomplete":
Unfortunatly, in CF6 it doen't work at all.
I've tried to change $form->data to $this->data but nothing changed.
Any help?
in CF5 I have this code to run the event "Autocomplete":
<?php
include "file_include/master.php";
$db->setQuery("SELECT * FROM $ana_intranet WHERE check_conguagliato IS NULL ORDER BY nominativo ASC");
$results = $db->loadObjectList();
foreach($results as $result ){
if(!empty($form->data['tag']) AND stripos($result->nominativo, $form->data['tag']) === false){
continue;
}
$json[] = array('id' => $result->codice_fiscale."_".$result->cod_azie, 'text' => $result->nominativo." (".$result->denominazione_azienda.")".$result->data_lic);
}
echo json_encode($json);
Unfortunatly, in CF6 it doen't work at all.
I've tried to change $form->data to $this->data but nothing changed.
Any help?
Hi Andrea,
Apologizes for the late reply!
In v6 the auto complete code should return a value/text array, no "id" or "text" keys should be used, so your code needs to be modified a bit to work.
Best regards
Apologizes for the late reply!
In v6 the auto complete code should return a value/text array, no "id" or "text" keys should be used, so your code needs to be modified a bit to work.
Best regards
Any helps or any examples...?
Hi Andrea,
This line:
This line:
$json[] = array('id' => $result->codice_fiscale."_".$result->cod_azie, 'text' => $result->nominativo." (".$result->denominazione_azienda.")".$result->data_lic);should be:
$json[] = array($result->codice_fiscale."_".$result->cod_azie => $result->nominativo." (".$result->denominazione_azienda.")".$result->data_lic);Best regards
This topic is locked and no more replies can be posted.