You can build your form in plain HTML and submit using jQuery ajax. 

It's not impossible, just time consuming. I wonder why you wouldn't want to 
use web2py's *SQLFORM.factory* or *FORM* to do it?


On Thursday, July 10, 2014 5:26:37 AM UTC+8, Maria Levchenko wrote:
>
> Sorry for novice question, but I can't handle it myself.
>
> Is there any possibility to update database from view without creating a 
> form in controller?
> I have a table in database with fields:
> - sentence (a sentence)
> - meaning (one word)
> - forms (list of words)
>
> And I have to ask user to select one word from "forms" that connect to 
> "meaning" (and show him a whole sentence).
>
> This is my view:
> {{for row in texts:}}
>     {{=row.sentences}}: {{=row.meaning}}<br>
>     {{for ff in row.forms:}}
>             {{if len(ff)>0:}}
>                    {{c=ff.split()}}<br>
>     <select> {{for cc in c:}} <option value = "cc">{{=cc}}</option> <br> 
> {{pass}}</select><br>
> {{pass}}
> {{pass}}
> {{pass}}
>
> <input type="submit">
>
> So i have several "select" fields on page and one button "submit".
> I want to insert in database (or update the rows) (with user's click on 
> button): sentence - meaning - selected form (from list).
> Can I do it or it's imposible?
>

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