Dear, I'm adding a log to a grid. One of the fields is related to another table, which has more than 2000 records. Using dropdown is not practical. How could I do it? Thank you
4 Answers
You can try using autocomplete.
It loads data from server only when you type.
refer: demos/integration/autocomplete.php
Table Client: idClient Int, name Varchar(60)
Table Voucher: idVoucher Int, idClient Int, dateVoucher date, amount decimal(10,2)
How can I save the idClient of the client table in the voucher table using autocomplete.
Refer attached demo, related code is at line 77-91 and sql_command query.
https://gist.github.com/gridphp/fb3f4f7ab15dfa0a2cd88532cb8e2e7c
Your Answer