Autocomplete search and store

QuestionsAutocomplete search and store
JOEL GOMES asked 9 years ago

Hi all, i'm having am issue with autocomplete i need to search for a client_name and get the value of the VAT and store the two, what is happening is that is doing everithing just dont store the value of client. he search and fill both but just store the VAT.
Here is my code:
Thank you all

$col = array();
$col["title"] = "Client"; // caption of column
$col["name"] = "client"; // grid column name, same as db field or alias from sql
$col["editable"] = true;
$col["width"] = "150";
$col["formatter"] = "autocomplete"; // autocomplete
$col["formatoptions"] = array("sql"=>"select name as v, vat as k From CLIENTS","search_on"=>"name", "update_field" => "VAT");
$col["editrules"] = array("required"=>true, "readonly"=>false);
$cols[] = $col;

$col = array();
$col["title"] = "VAT"; // caption of column
$col["name"] = "VAT"; // grid column name, same as db field or alias from sql
$col["editable"] = true;
$cols[] = $col;

1 Answers
Abu Ghufran answered 9 years ago

I am unable to generate this behavior. Your code also looks fine.

Working demo here:
http://hastebin.com/ebimeqopay.php

Change client name, it will change name and gender.

Your Answer

15 + 10 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?