Difference between #8 and #9 of
Load data from internal/external source to fill form fields

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
[...]
1 0
5 followers
Viewed: 34 492 times
Version: 2.0
Category: How-tos
Written by: skworden
Last updated by: skworden
Created on: May 17, 2015
Last updated: 8 years ago
Update Article

Revisions

View all history