Обновление:
Использование этого кода: Сладкие оповещения - Форма очереди Внести изменения в Swal.fire
<code> var strAns1;
var strAns2;
swal.mixin({
input: 'text',
confirmButtonText: 'Next →',
showCancelButton: true,
progressSteps: ['1', '2', '3']
}).queue([
{
title: 'Question 1',
text: 'Chaining swal2 modals is easy',
preConfirm: function(value)
{
strAns1= value;
}
},
{
title: 'Question 2',
text: 'Chaining swal2 modals is easy',
preConfirm: function(value)
{
strAns2= value;
}
}
]).then((result) => {
if (result.value) {
Swal.fire({
title: 'All done!',
html:
'Your answers: <pre>' +
JSON.stringify(result) +
'<pre>Answer1- ' + strAns1+
'<pre>Answer2- ' + strAns2+
'
', verifyButtonText:' Lovely! ' })}})
Изменить
<code>swal({
title: 'All done!',
html:
'Your answers: <pre>' +
JSON.stringify(result) +
'<pre>Answer1- ' + strAns1+
'<pre>Answer2- ' + strAns2+
'
', verifyButtonText:' Lovely! ' })}}) To Swal.fire ({title: 'All done!', html: 'Your answers:
' +
JSON.stringify(result) +
'<pre>Answer1- ' + strAns1+
'<pre>Answer2- ' + strAns2+
'
', verifyButtonText: 'Lovely!'})}})
Я получаю в результате это:
{"value":["adf","fffff"]}
Answer1- adf
Answer2- fffff
Теперь я могу передать это php? Как например? Спасибо большое спасибо.