Answer the question
In order to leave comments, you need to log in
How to correctly specify action in kartik-v/yii2-editable?
Good afternoon,
I don’t understand what I’m doing wrong)
Here is my form
<?php $form = ActiveForm::begin([
'id' => 'my-form-id',
'method' => 'POST',
//пробую тут указать экшен
]); ?>
<?php
echo Editable::widget([
'model' => $model,
'attribute' => 'description',
'asPopover' => false,
'format' => Editable::FORMAT_LINK,
'inputType' => Editable::INPUT_TEXTAREA,
'inlineSettings' => [
'templateAfter' => Editable::INLINE_AFTER_2,
],
'formOptions' => [
//пробую так указывать экшен
'action' => 'dass/ind',
],
'editableValueOptions'=>['class'=>'text-info'],
'options' => ['class'=>'form-control', 'rows'=>2, 'cols' => 80, 'placeholder'=>'Enter notes...'],
]);
public function actionIndex() {
$model = new DD();;
if (isset($_POST['hasEditable'])) {
\Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
if ($model->load(\Yii::$app->response->post())) {
Request URL: site/myController/index
Request Method:GET
Status Code:200 OK
Remote Address:127.0.0.1:80
Response Headers
view source
Cache-Control:no-store, no-cache, must-revalidate, post-check=0 , pre-check=0
Connection:Keep-Alive
Content-Encoding:gzip
Content-Length:3348
Content-Type:text/html; charset=UTF-8
Date:Thu, 25 Feb 2016 14:16:07 GMT
Expires:Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive:timeout=5, max=100
Pragma:no-cache
Server:Apache /2.4.7 (Ubuntu)
Set-Cookie: _identity = 2d1f43342912bdaf5b7c33440a449d4a9add4c816f15fb7c019956498dd77807a% 3A2% 3A% 7Bi% 3A0% 3Bs% 3A9% 3A% 22_identity% 22% 3Bi% 3A1% 3Bs% 3A50 % 3A% 22% 5B% 22736% 22% 2C% 22Glcht4AzgaFqp00yQMKz13cFhiMCZvtD% 22% 2C2592000%5D%22%3B%7D; expires=Sat, 26-Mar-2016 14:16:07 GMT; Max Age=2592000; path=/; httponly
Vary:Accept-Encoding
X-Powered-By:PHP/5.5.9-1ubuntu4.14
Request Headers
view source
Accept:application/json, text/javascript, */*; q=0.01
Accept-Encoding:gzip, deflate, sdch
Accept-Language:en-US,en;q=0.8,ru;q=0.6
Connection:keep-alive
Cookie: _csrf = 67c98ba8644a0e588fff270afe7a9779d7f9d20a926b48c798cf2696e7ea4b3ea% 3A2% 3A% 7Bi% 3A0% 3Bs% 3A5% 3A% 22_csrf% 22% 3Bi% 3A1% 3Bs% 3A32 % 3A% 22ZCZWbKx47KWevFg-VftcdOZQ3TzkO0BD% 22% 3B% 7D; PHPSESSID=p5eonjnsuou0bq75mktbf2rm11; _identity = 2d1f43342912bdaf5b7c33440a449d4a9add4c816f15fb7c019956498dd77807a% 3A2% 3A% 7Bi% 3A0% 3Bs% 3A9% 3A% 22_identity% 22% 3Bi% 3A1% 3Bs% 3A50 % 3A% 22% 5B% 22736% 22% 2C% 22Glcht4AzgaFqp00yQMKz13cFhiMCZvtD% 22% 2C2592000% 5D% 22%3B%7D
Host: myhost
Referer: site/myController/index
User-Agent:Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/47.0.2526.73 Chrome/47.0.2526.73 Safari/ 537.36
X-CSRF-Token:RC04Z1liWHIebmIwOykgRnNmbwIvJD9fEktMBD0tAiN3eUIMFlIaNg==
X-Requested-With:XMLHttpRequest
Answer the question
In order to leave comments, you need to log in
Widget has its own form, it conflicts with mine. Thanks to all who responded)
It seems to be - controller / action
Use the farbug to see which link the widget generates
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question