Hello,
I have a PHP page that returns a Json array of countries like this:
[code]{"Table":[{"ID":"1","Name":"Albania"},{"ID":"2","Name":"Afghanistan"}}[/code]
and i want to read this array and populate it to a DropDown inside my chronoForm.
How can i do that ?!
thank you,,
I have a PHP page that returns a Json array of countries like this:
[code]{"Table":[{"ID":"1","Name":"Albania"},{"ID":"2","Name":"Afghanistan"}}[/code]
and i want to read this array and populate it to a DropDown inside my chronoForm.
How can i do that ?!
thank you,,
Hi basharald,
Use a Custom Code action in the form ON Load event and add the code to get your result:
Then you should be able to use the Dynamic Data tab in a Drop-down element in the Designer tab with these settings
Enabled : Yes
Data Path : countries
Value Key: ID
Text Key : Name
Bob
Use a Custom Code action in the form ON Load event and add the code to get your result:
<?php
$result = //some PHP here to return the Json array
$table = json_decode($result, true);
$form->data['countries'] = $table['Table'];
?>
Then you should be able to use the Dynamic Data tab in a Drop-down element in the Designer tab with these settings
Enabled : Yes
Data Path : countries
Value Key: ID
Text Key : Name
Bob
This topic is locked and no more replies can be posted.
