Set the fields you don't want to be changed in each of the forms to 
readable=False and writable=False before calling SQLFORM, then you won't 
even need to use a custom form.

As for the data disappearing, I'm not entirely sure why, I'd have to see 
your code more carefully.

Quinta-feira, 12 de Dezembro de 2013 10:07:49 UTC, lucas escreveu:
>
> hey everyone,
>
> so i have a main form/view that shows all but three of the fields from a 
> single table.  and then i am designing another form/view to show the other 
> three.  the other three are text fields so that the user can write 
> paragraphs, so showing those three on a full form makes sense.  anyway, i 
> digress.  i am using SQLFORM with 
> "sform.process(onvalidation=chk_worksheet0).accepted:" under the controller 
> function and "{{=sform.custom.begin}}" ... 
>  "{{=sform.custom.widget.field_names}}"... under the view.
>
> so, if i modify the any of the three in the second form, and then submit, 
> the values are properly updated and stored in the database.  the 
> application then goes back to the main form and show the other data fine. 
>  however, if i go back into the second form, the one with only the three, 
> the data i originally put in is then gone.  i sql'ed the three fields, and 
> the data does disappear.  weird and why?
>
> i tried a few things to get it to work but i am not sure why the 
> application is just erasing the data when i go back into that second form. 
>  it only erases the data of the three fields and not the other fields.  the 
> main thing i tried was the fields option on SQLFORM, but that didn't seem 
> to work.
>
> suggestions?  lucas
>

-- 
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/groups/opt_out.

Reply via email to