Hello,
How can I autosave form / channel entries made via the safecracker module?
this doesn’t work:
$config['autosave_interval_seconds'] = 10;
and to autosave via a click event in JS/ jQuery fails since there are required fields.
$('a.top').click(function(fn) {
fn.preventDefault();
dataString = $('#publishForm').serialize();
$.ajax({
type: "POST",
url: $('#publishForm').attr('action') + '/json',
data: dataString,
dataType: "json",
success: function(data) {
if (data.success) {
alert('successfully saved (ID: '+data.entry_id+')')
} else {
var err_str = JSON.stringify(data.field_errors, null, 2);
alert('Saving no successfull, error '+ err_str);
console.log(data);
}
},
error: function(jqXHR, textStatus, errorThrown) {
alert('Error: ' + textStatus);
}
});
});
Can I anyhow disable temporarely the reuired field in safecracker to save this Entry as it is?
Hello Komtur,
Thank you for posting your question here on the ExpressionEngine forums.
This sounds like a great idea. If you can get this to work as an Add-On that would be awesome.
I am going to move this over to Development and Programming for you. I think the collaboration over this idea from the community of Devs there will be your best bet.
Have a great rest of the week.
Cheers,
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.