Revision #9 has been created by skworden on May 18, 2015, 4:29:12 PM with the memo:
removed comments
« previous (#8)
Changes
Title
unchanged
Load data from internal/external source to fill form fields
Category
unchanged
How-tos
Yii version
unchanged
Tags
unchanged
get, json, form, Jquery, Remote Data, lifedup
Content
changed
[...]
use yii\helpers\Html;
use yii\web\Response;
public function actionGetLocationAddress($id) {
Yii::$app->response->format = Response::FORMAT_JSON;
//echo JSON data for Get request to read
//always want to encode user input
echo Locations::find()->where('id = :id', [':id' => $id])->one();
}
```
Since the function is camelCased you should note that it needs to accessed like.
userlocations/get-location-address[...]