But how are you generating the form HTML? Are you doing it all manually? If 
so, I suppose your problem is that you have hard-coded the formkey, which 
actually changes on every page load.

Note, you can get the formkey dynamically via form.formkey. You can also 
get the whole div that includes the formkey and formname hidden fields via 
form.hidden_fields(). Finally, you can get the hidden fields div plus the 
closing </form> tag via form.custom.end.

Also, rather than generating all of the HTML manually, you can create a 
custom formstyle or use the method described here 
<http://web2py.com/books/default/chapter/29/07/forms-and-validators#Custom-forms>
.

Finally, note that if you only need to change a single element in the form, 
you can use server-side DOM manipulation 
<http://web2py.com/books/default/chapter/29/05/the-views#Server-side-DOM-and-parsing>
:

form.element('input#log_db_log_file').update(...)

Anthony


On Monday, December 14, 2015 at 10:59:57 PM UTC-5, Jitun John wrote:
>
> Here is the Code from the Model defining the table
>
> db.define_table('logs_db',
>                 Field('case_num'),
>                 Field('case_desc'),
>                 Field('log_gen_time', writable=False, readable=False),
>                 Field('log_uniq_name', writable=False, readable=False, 
> unique=True),
>                 Field('log_file', 'upload', autodelete=True),
>                 auth.signature)
>
>
> And here is the default.py controller
>
> def index():
>     form = SQLFORM(db.logs_db).process()
>     if form.accepted:
>
>
>
>
> On Monday, December 14, 2015 at 12:26:28 PM UTC+5:30, Anthony wrote:
>>
>> Please show the code you are using to generate and process the form.
>>
>

-- 
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