Hello everybody,
z have the following challenge:
I have a view with a tab widget which shows me various tabs and fills them with content.
One of these tabs shows me a list of contacts. I have now written a function that opens a modal after clicking on the contact person to edit the contact details. I use an ActiveForm for this. That works so far.
After changing the contact person, I would now like to reload the tab with the contact persons so that the changed data is also displayed.
I tried my hand at Pjax, but I can’t find the way how to use Pjax correctly in the place.
My code from the tab in the view:
<div id="p0" data-pjax-container="" data-pjax-timeout="false" class="customer-details-view">
... here is the contact list ...
</div>
On my modal content with the ActiveForm:
<?php $form = ActiveForm::begin(['options' => ['data-pjax' => 'p0' ],'action' =>['/customer/chgptacontact?id='.$model->id],'id' => 'ptacontactdata']); ?>
Maybe someone has a tip for me? That would be very helpful there. Maybe this is with YII but also not as I imagine.
Thanks a lot for your input.