mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
bcd9083d1c
The form throws a CSRF error if left for too long by itself. This is especially important for long forms. Use local ping function, as the CMS ping returns 403 when BasicAuth is enabled.
10 lines
204 B
JavaScript
10 lines
204 B
JavaScript
jQuery(function($) {
|
|
/**
|
|
* Make sure the form does not expire on the user.
|
|
*/
|
|
setInterval(function() {
|
|
// Ping every 3 mins.
|
|
$.ajax({url: "UserDefinedForm_Controller/ping"});
|
|
}, 180*1000);
|
|
});
|