[web2py] Re: keepvalues - need help with this

2016-01-12 Thread T.R.Rajkumar
But I use FORM and not SQLFORM. On Saturday, January 11, 2014 at 12:10:07 AM UTC+5:30, Kiran Subbaraman wrote: > > Hello All, > The *design *is: I have a custom form with the a controller that > inserts/updates a table. Tthe form accepts data, and on successful > submission of this form, it sta

[web2py] Re: keepvalues - need help with this

2016-01-12 Thread T.R.Rajkumar
I do this form.process(keepvalues=True,onvalidation=validate_meas).accepted: and the form retains values on submission. On Saturday, January 11, 2014 at 12:10:07 AM UTC+5:30, Kiran Subbaraman wrote: > > Hello All, > The *design *is: I have a custom form with the a controller that > inserts/upda

Re: [web2py] Re: keepvalues - need help with this

2016-01-12 Thread szande333
hi Kiran, would you posting an extract of your final solution? cheers Steve On Thursday, 16 January 2014 02:32:31 UTC+8, Kiran Subbaraman wrote: > > Anthony, > Thanks for the explanation. Went ahead and created widgets, and things > work just fine. > >

Re: [web2py] Re: keepvalues - need help with this

2014-01-15 Thread Kiran Subbaraman
Anthony, Thanks for the explanation. Went ahead and created widgets, and things work just fine. Kiran Subbaraman http://subbaraman.wordpress.com/about/ On Wed, 15-01-2014 2:28 PM, Anthony wrote: On Wednesday, January 15, 2014 3:47:28 AM UTC-5, Kiran Su

Re: [web2py] Re: keepvalues - need help with this

2014-01-15 Thread Anthony
On Wednesday, January 15, 2014 3:47:28 AM UTC-5, Kiran Subbaraman wrote: > > Hmm, I was planning to use keepvalues for the following scenarios: > >- Scenario1 - submitted form returns with errors, and still displays >the form with the submitted values > - Scenario2 - submit form succ

Re: [web2py] Re: keepvalues - need help with this

2014-01-15 Thread Kiran Subbaraman
Hmm, I was planning to use keepvalues for the following scenarios: * Scenario1 - submitted form returns with errors, and still displays the form with the submitted values * Scenario2 - submit form successfully, and still display the form with the submitted values You mention that the kee

Re: [web2py] Re: keepvalues - need help with this

2014-01-14 Thread Anthony
keepvalues is for retaining values when there are no errors (but you want to retain the values from the previous submission). If there are errors, the values will be retained regardless of keepvalues. In your case, you are not using form.custom.widget, so you're not getting the values retained.

Re: [web2py] Re: keepvalues - need help with this

2014-01-14 Thread Kiran Subbaraman
Anthony, Thanks for the link; that is useful. Also, was looking at the implementation of the default widgets in https://github.com/web2py/web2py/blob/master/gluon/sqlhtml.py. I think I can conclude that keepvalues does not retain values, as detailed in this email. Considering that I have to c

Re: [web2py] Re: keepvalues - need help with this

2014-01-14 Thread Anthony
Some instruction about creating custom widgets at the end of this section: http://web2py.com/books/default/chapter/29/07/forms-and-validators#Widgets. On Tuesday, January 14, 2014 12:33:22 AM UTC-5, Kiran Subbaraman wrote: > > Yes, that works: use request.vars.*. That was the option which I had

Re: [web2py] Re: keepvalues - need help with this

2014-01-13 Thread Kiran Subbaraman
Yes, that works: use request.vars.*. That was the option which I had mentioned I may need to resort to, since *keepvalues *doesn't seem to work for me. This basically comes down to me creating a bunch of widgets; mirroring the ones in web2py, where a widget would have logic, similar to the one

[web2py] Re: keepvalues - need help with this

2014-01-13 Thread Massimo Di Pierro
Strange. How about {{=request.vars.country or form.custom.inpval['country']}} On Monday, 13 January 2014 11:13:33 UTC-6, subbaram...@gmail.com wrote: > > Massimo, > Yes, I did. Does not make a difference. > > Thanks for the suggestion, > Kiran > > On Monday, January 13, 2014 7:49:15 PM UTC+5:30,

[web2py] Re: keepvalues - need help with this

2014-01-13 Thread subbaraman . kiran
Massimo, Yes, I did. Does not make a difference. Thanks for the suggestion, Kiran On Monday, January 13, 2014 7:49:15 PM UTC+5:30, Massimo Di Pierro wrote: > > Have you tried replacing > > value="{{=form.custom.inpval['country']}}" > > with > > value="{{=form.custom.dspval['country']}}" > > On S

[web2py] Re: keepvalues - need help with this

2014-01-13 Thread Massimo Di Pierro
Have you tried replacing value="{{=form.custom.inpval['country']}}" with value="{{=form.custom.dspval['country']}}" On Sunday, 12 January 2014 22:50:43 UTC-6, subbaram...@gmail.com wrote: > > Really would like some help with this. Anyone have suggestions? > Thank you, > Kiran > > On Saturday, J

[web2py] Re: keepvalues - need help with this

2014-01-12 Thread subbaraman . kiran
Really would like some help with this. Anyone have suggestions? Thank you, Kiran On Saturday, January 11, 2014 12:10:07 AM UTC+5:30, subbaram...@gmail.com wrote: > > Hello All, > The *design *is: I have a custom form with the a controller that > inserts/updates a table. Tthe form accepts data, a