How can i get a specific element during form submit and store it in a session variable? Say I want to just get the ID of the form with the name = "id". Say the name of the input field was "id"
My form is submitting perfectly to the database but I want to save the ID session variable for later on another page.
i tried
$(‘#form').submit(function(e) {
var inputId = $('#form :id');
sessionStorage.SessionName = inputId;
var fd = new FormData(document.getElementById(“#form"));
fd.append("label","WEBUPLOAD");
$.ajax({
type: "POST",
url: “myUrl",
data: fd,
success: function(data){
alert(data);
}
});
Should I maybe serialize it?