Hello!
Looks some terrible, but does what you want!
Just paste in any controller and go to   .../list_fld_keep_values_tst
or you can preset list-values by URL('your_controller', '
list_fld_keep_values_tst', vars=dict(defs=['val_1','val_2','val_3']))

def list_fld_keep_values_tst():
    
    frm=SQLFORM.factory(  Field('fld_lst', 'list:srting', default = request.
vars.defs)  )
    if frm.process().accepted:
        
        #place your code here,  before redirect!
        
        session.flash='Well are you happy now? Let me know in any case!'
        redirect(URL('list_fld_keep_values_tst', vars=dict(defs=request.vars
.fld_lst) ))
    elif  frm.errors:
        #do any 
        response.flash='there are errors!' 
    return dict(frm=frm)




On Wednesday, June 25, 2014 at 6:33:26 PM UTC+3, Ian W. Scott wrote:
>
> I've got a SQLFORM.factory form set to keep values after processing with 
> process(keepvalues=True). But it doesn't work on a list:string field. The 
> (otherwise very nice) widget loses all but the first value when the form is 
> submitted (i.e., all but the first text inputs for the field disappear). Is 
> there any way to carry those other text inputs and their values over?
>
>
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to