php


Yii2: Redirect to another page index inside a tab


I trying to redirect to another index page inside the tab.
<?php
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use kartik\tabs\TabsX;
use kartik\date\DatePicker;
use frontend\models\OpStates;
use frontend\models\OpContact;
use frontend\models\OpCountries;
use frontend\models\OpClient;
use frontend\models\OpUnit;
use frontend\models\OpMaintenanceCharges;
use yii\helpers\ArrayHelper;
use yii\helpers\Url;
$this->title = 'Change Profile';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="site-changedetails">
<?php $form = ActiveForm::begin(['id'=>'changedetails-form',]); ?>
<?= TabsX::widget([
'position' => TabsX::POS_ABOVE,
'align' => TabsX::ALIGN_LEFT,
'items' => [
[
'label'=>'Client Details',
'content'=>
'<div class="row">
<div class="col-md-12">'.
$form->field($model, "client_code")->textInput(["maxlength" => true]).'
</div>
</div>
<div class="row">
<div class="col-md-12">'.
$form->field($model, "contact_id")->dropDownList(ArrayHelper::map(OpContact::find()->all(),'id','code')).'
</div>
</div>
<div class="row">
<div class="col-md-12">'.
$form->field($model, "unit_id")->dropDownList(ArrayHelper::map(OpUnit::find()->all(),'id','code')).'
</div>
</div>
<div class="row">
<div class="col-md-12">'.
$form->field($model, 'country_id')->dropDownList(ArrayHelper::map(OpCountries::find()->all(),'id','name'),
[
'prompt' => 'Select Country',
'onchange' => '
$.post("index.php?r=op-states/lists&id='.'" + $(this).val(), function(data){
$("select#opclient-states_id").html(data);
});'
]).'
</div>
</div>
<div class="row">
<div class="col-md-12">'.
$form->field($model, 'states_id')->dropDownList(ArrayHelper::map(OpStates::find()->all(),'id','state_name'),
[
'prompt' => 'Select States',
]).'
</div>
</div>
<div class="row">
<div class="col-md-6">'.
$form->field($model, 'city')->textInput(['maxlength' => true]).'
</div>
<div class="col-md-6">'.
$form->field($model, 'postcode')->textInput().'
</div>
</div>
'
],
[
'label'=>'Client Details 2',
'content'=>
' <div class="row">
<div class="col-md-12">'.
$form->field($model, "charge_interest")->dropDownList(['Yes'=>'Yes','No'=>'No']).'
</div>
</div>
<div class="row">
<div class="col-md-12">'.
$form->field($model, 'interest_effective_date')->widget(DatePicker::classname(), [
'pluginOptions' => [
'autoclose'=>true,
'format' => 'yyyy-mm-dd',
'todayHighlight' => true,
'todayBtn' => true,
]
]).'
</div>
</div>
<div class="row">
<div class="col-md-12">'.
$form->field($model, "charge_reminder")->dropDownList(['Yes'=>'Yes','No'=>'No']).'
</div>
</div>
<div class="row">
<div class="col-md-12">'.
$form->field($model, "external_debtor_code")->textInput().'
</div>
</div>
<div class="row">
<div class="col-md-12">'.
$form->field($model, "mailing_address1")->textInput().'
</div>
</div>
<div class="row">
<div class="col-md-12">'.
$form->field($model, "mailing_address2")->textInput().'
</div>
</div>
<div class="row">
<div class="col-md-12">'.
$form->field($model, "mailing_address3")->textInput().'
</div>
</div>
<div class="row">
<div class="col-md-12">'.
$form->field($model, "mailing_address4")->textInput().'
</div>
</div>
'
],
[
'label'=>'Maintenance Charges',
'content'=> Yii::$app->response->redirect(Url::to(['//op-maintenance-charges/index'])),
],
]
]); ?>
<div class="form-group">
<div class="row">
<div class="col-md-1 col-md-offset-11">
<?= Html::submitButton('Save',['class'=>'pull-right btn btn-primary','style'=>'width:70px; height:40px;','name'=>'button1']) ?>
</div>
</div>
</div>
</div>
<?php ActiveForm::end(); ?>
</div>
But then it shows the error Object of class yii\web\Response could not be converted to string. How should I type it? Or is there any error in my code? Your help appreciated. Thankss
You could use label for this
'label'=>'Maintenance Charges',

Related Links

Efficient way of adding keys to array
How to get the last auto-inserted SQL timestamp
Post the only modify input field php [closed]
How to deal with time zone in MySQL?
utf8 not converting string in PHP
Separating date and time from datetime format mysql
multiple child in nodes in php simplexml-displaying only first item
count returns to zero in preg replace
PHP Prevent multiple MySQL Connections
How to know my mail send to recevier in php
display an html page within tinymce textarea
Search form with pagination
Parsing ID3v2 tags with PHP only
How to download access using '.htaccess' files?
Controller can view related field, but does not display it in add or edit action
How to upload files without whitespace

Categories

HOME
office365
firebase
android-studio
class
list
lambda
android-fragments
transactions
braintree
supercollider
wagtail
alljoyn
erd
graphdb
google-tasks-api
web-deployment
asciimath
hidden
pickle
cloudsim
http-authentication
multiple-tables
pe
coreldraw
altium-designer
chronicle-queue
function-points
nurbs
openbravo
uilocalnotification
social-networking
d3.js-v4
opnet
overwrite
adminer
keyboard-layout
swfupload
raytracing
google-prediction
julius-speech
moinmoin
cloudwatch
password-hash
openstack-glance
watir-webdriver
exc-bad-access
winmerge
libharu
msg
conan
android-4.2-jelly-bean
verisign
ioexception
stack-smash
variable-length-array
wso2ml
ngcordova
uitest
bootstrap-wysiwyg
angular-amd
nsmutabledata
encryption-symmetric
configurable-product
wicket-1.5
dmake
nidaqmx
lumia-imaging-sdk
rpg
hotswap
typesafe-stack
autonumber
ctp
grails-2.3
django-facebook
jacob
icenium
simplecov
image-formats
getopt-long
coordinate
kaazing
cakeyframeanimation
jzmq
liveconnect
netstream
n-queens
sigar
multidrop-bus
boost-foreach
page-curl
kernel32
upshot
servlet-container
mongrel
resharper-5.1
3-tier
reliability
j2mepolish
ntruencrypt
icon-language
community-server
jvm-bytecode

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App