Populate a drop-down list from JSON

QuestionsPopulate a drop-down list from JSON
DGea asked 7 months ago

Dear Sir,

Is there a script to display the dropdown list using json data with autocomplete

See image : https://imgur.com/a/JfoHDxB

4 Answers
DGea answered 7 months ago

Addition info:

My case is as you see on the picture https://imgur.com/a/QTGXhdo

Abu Ghufran Staff answered 7 months ago

You can fill dropdown with any static values using:

$col[“edittype”] = “select”;
$col[“editoptions”] = array(“value”=>’10:$10;20:$20;30:$30;40:$40;50:$50′);

Now you can call (curl) your JSON api using php, parse JSON and it string like key:val;key:val;key:val etc … and set in editoptions->value option.

If you want JSON api along with dependent dropdown, let me know. I’ll review how it’s doable.
It’s currently not supported and will need some changes as well.

_________________________
Abu Ghufran - Dev Team
PHP Grid Framework
 
DGea answered 7 months ago

Yes sir, I still need it. Because, there are many applications that must be bridging with other applications using the API with the JSON data format.  I am very grateful if there is a solution.  Thanks Sir.

Abu answered 7 months ago

Currently JSON api dependent dropdown loading is not supported and can’t give a timeline for it. I’d recommend to follow manual code for it.

Your Answer

4 + 12 =

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 / 5. Vote count:

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

Let us improve this post!