On Sunday, November 27, 2011 11:24:32 PM UTC-5, Constantine Vasil wrote: > > HI Anthony, > > Thank you! > > This is useful information not available in the book. >
Well, that specific example isn't in the book, but the use of the 'default' arg to Field() is documented, and it mentions that it is used to pre-populate form values: http://web2py.com/book/default/chapter/06#Record-Representation. We should probably add such an example to the Forms chapter, though. > > Now I would define the default in the form definition: > form = SQLFORM.factory > > How to change it programmatically to other checked > value before the form is submitted? > I'm not sure what you mean. Can you explain? Note, the default can be a lambda function if needed. Anthony