Forums

json data

cyber81 22 Jun, 2015
Good evening guys, I had a problem ...
I have a form in which there is a dropdown dynamic that takes data (specifically the ID field) from a table XXX. I wish once chose the ID value from the list of ID loaded, a "Z" field from the record with this ID will be stored in a textbox.

So I did an event in the "designers" with "set dynamic value"

ON "new value! =" -> "White space" -> of dropdowninquestione -> set value of caselladitesto -> ajaxevent

So I created a new event named ajaxevent in setup and I entered the DBREAD with the following condition:
<? Php
return array ('id' => $ orm-> data ['dropdown30']);
?>

That is, take the record whose id is equal to the value entered in dropdowni.
Then it is necessary that the value of the insert in the textbox:

<? Php
$Options = array ();
foreach ($form-> data ['Data23'] as $d) {
$Options [$d['id']] = $d['idimpianto'];
}
echo json_encode ($options);
?>

The only problem is that the value comes back to me in this form:
{"", "Test 123"} when they really should be only test 123.
How I can management the echo?

Do you have any ideas on how to solve
Google Traduttore per il Business:Translator ToolkitTraduttore di siti web
This topic is locked and no more replies can be posted.