Answer the question
In order to leave comments, you need to log in
How to make confirmation of sending a document?
Hello everybody! The essence of the question is as follows, there is a display of information on objects through the GridView on the page, I wrote a function to generate a pdf file for a specific record id, the button works and the document in the form of pdf comes to the mail, everything is fine here, the problem is that when you click on send button - it just reloads the page, but I would like that when you click on the send button, confirmation was first requested, something like: "Are you confirming the sending of the letter?". I tried to solve my problem in the following way, but it didn't work:
[
'label' => '',
'value' => function($data){
if($data['email'] == true){
return Html::a(
'<span>',
Url::to(['order/pdf', 'id' => $data->id]),
[
'class' => 'glyphicon glyphicon-envelope',
'title' => 'Отправить документ на email ' . $data->email,
'data' => [
'confirm' => 'Вы подтверждаете отправку документа?',
'method' => 'post',
],
]);
}else{
return '';
}
},
'format' => 'html',
],
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question