i'm trying to make pop-up window when my form loads. and when you enter ID number in the pop-up window, it stores in the text-field in the form. enter image description here - this is where u put the ID Number. enter image description here - and this is where i want the value to be saved. I'm using AgilePoint - and inside i insert js code and sweetalert2. this is the code i'm trying to do:
eformEvents.onFormLoadComplete = function()
{Swal.fire({ //rtl:true
title: 'title', html: '<p>hello</p>', icon:info, input:'text', inputLabel: 'Enter ID'
})
.then(inputValue) => {document.getElementById("Eid").Value = inputValue}
Swal.fire('Success')
})}
I'm trying to popup a window when my form loads. When you enter the ID number in the popup window, it is stored in the text field in the form. Enter the image description - this is where you put the ID number. Enter the image description - this is where I want the value to be saved. I'm using AgilePoint - inserting js code and sweetalert2 in it. This is the code I'm trying to do:
eformEvents.onFormLoadComplete = function()
{Swal.fire({ //rtl:true
title: 'title', html: '<p>hello</p>', icon:info, input:'text', inputLabel: 'Enter ID'
})
.then(inputValue) => {document.getElementById("Eid").Value = inputValue}
Swal.fire('Success')
})}
The then block of SweetAlert will receive an object. You need to select the value attribute from this object.
Try something like below.