Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I'm facing a similar problem with one of my projects too, how to fill a vast amount of information in a non-obtrusive manner, preserving state on edits.</p> <p>Technologies already exist to do this quite nicely, namely ajax and json. My project is built with PHP so my idea is to create a view which displays all data entry forms but it saves the data incrementally by sending the completed fields to a PHP script with ajax, which then saves/updates the object.</p> <p>Theoretically with some javascript niceness it should be possible to make a very efficient interface (think completed sections have a save button and slide closed, which then can be opened for further editing)</p> <p>Its possible to make this a very modular design, implementing for example write once fields, once saved cant be edited.</p> <p>This is indeed a very interesting topic that many sites seem to struggle with. Please tell me if I grabbed the wrong end of the stick here and posted an answer which is not relevant/helpful</p> <p>To reduce duplicate code and really make this sleek and manageable I would implement it with a MVC design pattern. Have your view send data whenever user stops typing in a field and its not empty. Then have the controller check if the field needs updating and send the correct acknowledgements back down to the view. Model will play its part too as you will be no doubt saving the data into your database.</p> <p>The View will essentially be a modular ajax script, it has inputs and monitors them for changes, as soon as enough changes are made (to warrant a partial save) the ajax sends the data to the controller and collapses the relevant section to show that it has been completed. Likewise if you revisit the page and the controller sees that there is some data in the model for theese fields it sends it to the ajax view, which then fills in and collapses the prefilled sections =) Quite neat i think.</p> <p>Edit: fixing typos, added MVC comment</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload