Robel T. Fesshaye

Infinite Innovation

  • Home

How to Auto Save HTML Form Data -Google Drive Style!

December 29, 2016

To save form data instantly as the user types data on the form (inputs data) follow the following steps (these steps work perfectly on Electron Framework too).

1- Download sisyphus.min.js from here.

2- The file you downloaded is a zip file, unzip it. You need only the sisyphus.min.js file. Copy and past this file to the folder where your file with the form code will be.

3- Include the following script to your  <head>…..</head> section.


<script type="text/javascript" src="sisyphus.min.js"></script>

4- Add this script before </body>;


<script type="text/javascript">
$('#formId').sisyphus();
</script>

Replace formId with the id of your respective form. If you have multiple forms, make sure the formId is different for each one.

5- Sample of a form which autosaves user input;


<!DOCTYPE HTML>
<html>
<head>

<script type="text/javascript" src="sisyphus.min.js"></script>

</head>
<body>

<form action="" id="form1" name="myform" method="post">
<div class="form-group">
<label for="exampleTextarea">Sample Form</label>
<textarea class="form-control" id="exampleTextarea" rows="13" placeholder="write content here"></textarea>
</div>
</form>

<script type="text/javascript">
$('#form1').sisyphus();
</script>

</body>
</html>

Posted in: App Dev Tagged: autosave, Electron
← Electron Framework 101
How to Set a Custom Taskbar Icon for Your Electron Window →

Recent Posts

  • How I Passed the AWS SysOps – Associate (SOA-C02) Exam
  • How I Passed the Certified Kubernetes Application Developer (CKAD) Exam
  • How I Passed the Certified Kubernetes Administrator (CKA) Exam
  • How I passed the AWS Solutions Architect (Associate) Exam

Categories

  • App Dev (4)
  • AWS Solutions Architect – Associate (6)
  • Certifications (5)
  • Electrical Engineering (1)
  • Java (7)
  • PHP & SQL (2)
  • Windows OS (4)

Archives

Tags

#Apache #BlockPorn #DualScreen #Fonts #OpenDNS #Port80 Arrays autosave Electron SQLServer Strings Substrings

Copyright © 2025 Robel T. Fesshaye.

Me WordPress Theme by themehall.com