We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Safecracker Autosave?

Development and Programming

Komtur's avatar
Komtur
15 posts
14 years ago
Komtur's avatar Komtur

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?

       
Shane Eckert's avatar
Shane Eckert
7,174 posts
14 years ago
Shane Eckert's avatar Shane Eckert

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,

       
Est Digital's avatar
Est Digital
62 posts
13 years ago
Est Digital's avatar Est Digital

any updates on this? i’d be interested.

       
Pv Ledoux's avatar
Pv Ledoux
95 posts
13 years ago
Pv Ledoux's avatar Pv Ledoux

hi there, any news about this? Did you had the chance to develop the addon?

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.