Answer the question
In order to leave comments, you need to log in
How to make it so that the original url doesn't change when using Pjax?
<?php
Pjax::begin([]);
$typeForm = ActiveForm::begin([
'action' => ['/post/add-type2'],
'options' => [
'class' => 'addType',
'data' => ['pjax' => true],
]
]);
// данные формы и закрытие формы и pjax-а
?>
// логика обработчика
return $this->render('multiple',compact('types'));
Answer the question
In order to leave comments, you need to log in
vendor/yiisoft/yii2/widgets/Pjax.php
/**
* @var bool whether to enable push state.
*/
public $enablePushState = true;
/**
* @var bool whether to enable replace state.
*/
public $enableReplaceState = false;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question