Experimental
This requires additional severver side programming. Do not use in production.
Version
Since 2022/12
Custom Lookup (Serverside)¶
AppGini Helper Javascript Library is a pure clientside extension, which runs in the browser. Whenever we need data from the server, this can not be done by just using clientside code, but we need additional serverside code which serves data from the server to the client, requested by the client. You can use a custom PHP
script, returning JSON
in a specific format or order our services for programming such.
(1) Prerequisites¶
- Requires a normal
<input/>
field in your model and database - Requires a serverside script which can read the request parameters.
This serverside script is NOT part of AppGiniHelper Javascript Library
(2) Client Side Code¶
1 2 3 4 5 |
|
(3) Server Side code¶
Request¶
Client sends a request having as parameter named search
. This contains the user input inside the search-field of the dropdown control.
1 2 3 4 5 |
|
Your script has to return an JSON-encoded array
like the following:
1 2 3 4 5 6 7 8 9 |
|