-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Save all fields to localStorage
#4
Comments
I'd like to take this one. |
That's great! |
Btw, don't worry too much about the src/dist directories. If you put a PHP test server in the src directory, it should be the same as the dist. Currently the only difference between src and dist is that index.php is compiled to a static index.html Eventually, I'll also minify the css/js in the dist directory. The goal though is to keep it so that applying the php devserver in src is enough to test/run the site. |
@CharanMN7 Are the changes in your fork working? I know there have been many changes in this repo since you started, but none of them should break the code if it works on that older ref. |
@mwt The changes are working but.... the extra links I added are behaving a bit odd when I try to retrieve them from local storage. They're not going away even when I clear the cookies. I'm not sure if it's the JavaScript I wrote, or the PHP variables... I got occupied with my exams that suddenly got preponed. (Still am) |
Thanks! Good luck on your exams. I think that local storage is separate from cookies. One way to clear it is with |
Okay, I'll try that now. |
Hi, is anyone still working on this issue? If not, I would be happy to take this :) |
Sure! I'd like to pass it. I'm too caught up to be working on anything right now. @chriskthomas ? |
I assigned for @chriskthomas. That would be helpful @cristianmacedo. You can take a look at what @CharanMN7 did to get a start: js (commit of me deleting it): 9449cdc Thanks @CharanMN7 for the work you did on this. I think you can be less conservative with editing the html in the web form. For example, it's probably more robust to iterate over a new class that you add to the inputs rather than all inputs. I'm not sure which event is best to use for saving the inputs. Perhaps you want to add a You could also save when the submit button is clicked. I think you'll need to |
Well, the data is lost only when the form is closed or submitted. So I tried using |
Thanks for all the information guys, I opened PR #24 and shared some details regarding implementation decisions on the comments. I appreciate the opportunity of contributing to this project and welcome any feedback and suggestions. |
Right now, all inputs are lost if you refresh the page or return later. I think a reasonable implementation would be one such that:
The text was updated successfully, but these errors were encountered: