What JavaScript function will auto-submit a Qualtrics survey? I want to create a button in the header or footer of a Qualtrics survey that will automatically submit the survey whenever the user wants to quit. It seems like a pretty standard feature for survey software to have. The question may not seem well researched but that's because there are NO Qualtrics resources out there on this.
I found parts of the Qualtrics JS that might be relevant:
function pressSubmitButtonOnEnter(evt, id) {
if (evt.keyCode == Event.KEY_RETURN) {
Event.stop(evt);
$(id).click();
return false;
}
}
This one as well:
function submitForm(formID) {
var form = $(formID);
if (form) {
Event.fire(form, 'submit');
if (form.onsubmit)
form.onsubmit();
if (form.submit)
form.submit();
return true;
}
}
function submitFormJumpTo(formID, jumpTo) {
$(formID).action = jumpTo;
submitForm(formID);
}
This:
var SEonSubmit = {
add : function (onSubmitFunction) {
Event.observe('Page', 'submit', onSubmitFunction);
}
};
var SEonClick = {
add : function (onClickFunction) {
Event.observe('Page', 'click', onClickFunction);
}
};
According to Qualtrics, there is no way to do this. I submitted a request feature.