If you read, I suggested that when the 'page close' or 'navigate away' 
event is fired, you can trigger a save then (one option). You can use 
parsely to manage your validators (because you don't want to save invalid 
data). It will do run-time validation, which you can then hook into to do 
the saving for you, so as soon as valid data is entered, it is saved.

Another option is to collect a small amount of information at a time. Such 
like a 'wizard' interface. Take a look here for what I'm talking about:

http://parsleyjs.org/doc/examples/multisteps.html


On Friday, June 13, 2014 3:29:20 PM UTC-7, Francisco Ribeiro wrote:
>
> Thank you for stepping up to reply but 'parsely' looks more like a library 
> for client-side form validation which is not really the major problem I am 
> trying to address. My goal is to have a mechanism that stores (with 
> persistence) information provided by the user as soon as possible once it 
> is provided input field by input field (on focusOut event) , rather than 
> just doing all at once when the form is submitted. Anyway, thanks :)
>
> Francisco
>
>
> On Friday, 13 June 2014 21:06:48 UTC+1, Derek wrote:
>>
>> Try 'parsely'
>>
>> http://parsleyjs.org/doc/examples/simple.html
>>
>> and prompt on page close to save first.
>>
>> On Wednesday, June 11, 2014 7:43:41 PM UTC-7, Francisco G. T. Ribeiro 
>> wrote:
>>>
>>> hi all,
>>> I'm working on an app that uses forms that can be quite long and its 
>>> users often interrupt their sessions for whatever reason and end up losing 
>>> the information already filled. For this and other reasons I wanted to 
>>> provide a different behaviour to these forms where each input field updates 
>>> the record on the database as soon as its input field is released 
>>> ('focusOut' event on jQuery). Ideally, the server would reply with 
>>> 'success' or an error message so users know when they can move on to 
>>> another field (without refreshing the whole page). By the end of the form, 
>>> the user wouldn't have to review things that were written long ago since 
>>> these were all already validated.
>>>
>>> Now, I know this can be tricky due to database constrains but because i 
>>> need to do this very often (multiple fields and multiple forms), I thought 
>>> it would be useful to automate it, maybe even by having on the db Field 
>>> something like '..auto_update=True' (merely a suggestion) but before 
>>> getting there, I would like to know if anyone has faced this problem and if 
>>> yes what solution did you employ? 
>>>
>>> Thank you in advance,
>>> Francisco
>>>
>>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to