data['tag']) AND stripos($un_codice['codiceprodotto'], $form->data['tag']) === false){ continue; } $json[] = array('id' => $un_codice['nomeprodotto'], 'text' => $un_codice['codiceprodotto']);}echo json_encode($json);?>"> textbox autocompleter not save db - Forums

Forums

textbox autocompleter not save db

agostinopol 22 Jun, 2016
Hi, I created a textbox Autocompleter with 30,000 records (works well). The problem is that since I set the Autocompleter the form does not save more in the db, click on "next button" back up the page without saving confirm.

the table is composed of two fields, primary key "codiceprodotto" and "nomeprodotto")

Autocompleter the code:
<?php
foreach($form->data['Datacom'] as $un_codice){
    if(!empty($form->data['tag']) AND stripos($un_codice['codiceprodotto'], $form->data['tag']) === false){
        continue;
    }
    $json[] = array('id' => $un_codice['nomeprodotto'], 'text' => $un_codice['codiceprodotto']);
}
echo json_encode($json);
?>
GreyHead 22 Jun, 2016
Hi agostinopol,

Is the form submitting at all? It sounds more like a problem with SEF URLs than with the AutoCompleter itself,

Please post a link to the form so I can take a quick look.

Bob
agostinopol 22 Jun, 2016
ok, the problem was sending the mail.

Now my problem is the dynamic to (email configuration)
agostinopol 22 Jun, 2016
I have to send the email to the login

I already called the mail login in a textbox with this code (custom advanced in designer)

<?php
$user = JFactory::getUser();
$form->data['mailutente'] = $user->email;
?>

and in field dynamic to {mailutente}
agostinopol 22 Jun, 2016
1 Likes
resolved
custom advanced in submit (setup)
<?php
$user = JFactory::getUser();
$form->data['mailutente'] = $user->email;
?>
and in field dynamic to mailutente
This topic is locked and no more replies can be posted.